SELECT of records in range

  • VK
  • VK's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
4 years 3 months ago #22854 by VK
SELECT of records in range was created by VK
Hi
What is the fastest way to SELECT a set of records from a J4 table?

@IDs are in the format: (account_number)-(date_in_internal_format), e.g. 5001-18628.

trying:

SELECT THE.TABLE WITH @ID BETWEEN "5001-18628" "5001-23012"

Result is bit more than a second (Windows 2019 server, enough memory and CPUs). Maybe it can be improved?

usr: 1.11 sys: 0.00 elapsed: 0m1.11s

Usage of "GE ... LE" didn't help:

usr: 1.36 sys: 0.00 elapsed: 0m1.36s

Records number: circa 340,000.

Resizing didn't help.
Conversion to JR, as expected, made things a bit worse.

Thought about year-based distribution but haven't given it a try yet.

Cheers
VK

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds