Hi.
One of our large customers have a database design where they have a classical one to many relation between to table loosely connected. It is a data table (PK incremental bigint and one VARBINARY Data columns) and a lookup table = PK incremental int, 8 columns bigint referring to the PK in the data table.
The relations is handled by the business layer. This works flawlessly.
In some rare situations they need to run through all the data in these tables mainly in order of the data table.
The design causes the reference columns in the lookup table will reference the PK in the data table with further and further distance.
They select 8 rows at a time from the data table like:
SELECT Data FROM DataTable WHERE Identifier IN (1,2,3,4,5,6,7,8)
SELECT Data FROM DataTable WHERE Identifier IN (1,2,3,4,1000,10001,2000,2001)
The issue is that the further apart the PK in the data table is, the longer it takes so during the process things slow down.
Can any design/tricks solve this and make a boost in performance?
Regards Thomas