---
id: change/bcapps/11822
type: change
title: "#11822 Added missing indexes for GP historical snapshot"
summary: Added missing indexes to three GP historical snapshot staging tables to improve query performance during data migration.
tier: official
language: en
tags:
  - performance
  - main
  - bc30
  - table gpivseriallotnumberhist
  - table gp rm20201
  - table gp rm30201
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:03:14.134Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 66970b6aa4d2ea068a06ebcf4ffb584f51c00219
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11822
    title: "microsoft/BCApps#11822: Added missing indexes for GP historical snapshot"
    date: "2026-09-30"
    commit: 66970b6aa4d2ea068a06ebcf4ffb584f51c00219
    t: null
    quote: This PR adds missing indexes to the following GP historical snapshot related staging tables.
links:
  learn: []
  objects:
    - object/table/4038
    - object/table/40144
    - object/table/40145
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11822
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11822
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-30T14:23:06Z"
author: jaymckinney-enavate
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: Apps (W1)"
  - From Fork
  - "Team: Integrations"
change_class: code
change_kind: performance
behavior_change: false
breaking: false
files:
  count: 3
  additions: 9
  deletions: 0
  al: 3
apps:
  - HybridGP
objects_touched:
  - key: table/4038
    page: table/4038
    type: table
    id: 4038
    name: GPIVSerialLotNumberHist
    app: HybridGP
    status: modified
  - key: table/40144
    page: table/40144
    type: table
    id: 40144
    name: GP RM20201
    app: HybridGP
    status: modified
  - key: table/40145
    page: table/40145
    type: table
    id: 40145
    name: GP RM30201
    app: HybridGP
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues:
  - 11800
work_items:
  - 652333
systems:
  - development
quote: This PR adds missing indexes to the following GP historical snapshot related staging tables.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11822 Added missing indexes for GP historical snapshot

> Added missing indexes to three GP historical snapshot staging tables to improve query performance during data migration.

[Pull request](https://github.com/microsoft/BCApps/pull/11822) · merged into `main` (BC30) on 2026-09-30 by jaymckinney-enavate (community contribution) · 3 files (+9 -0), 3 AL · performance · tier official · reviewed (checked by Opus)

## What changed

- New index on CUSTNMBR, APTODCTY, APTODCNM added to GP RM20201 and GP RM30201
- New index on IVDOCTYP, DOCNUMBR, LNSEQNBR added to GPIVSerialLotNumberHist
- Only key definitions added; no logic changes
- Affects HybridGP historical snapshot staging tables

## AL objects touched

- [Table 4038 "GPIVSerialLotNumberHist"](../../objects/table/4038.md), HybridGP: modified
- [Table 40144 "GP RM20201"](../../objects/table/40144.md), HybridGP: modified
- [Table 40145 "GP RM30201"](../../objects/table/40145.md), HybridGP: modified

## Context

- Fixes: [#11800 [Bug]: Missing indexes in GP migration historical snapshot](https://github.com/microsoft/BCApps/issues/11800) (closed)
- Work items: AB#652333
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Team: Integrations
- Systems: development
- From the description: "This PR adds missing indexes to the following GP historical snapshot related staging tables."

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
