Write for Us
The selection speed of different record sets is not linear to the number of rows. Because many steps have to be taken for any selections, getting extra records out of the database often hardly takes any more time. In a typical database, I have about 17 million records in a table. By making a selection of 20,000, 50,000, 100,000, and 150,000 records, I calculated the execution time per record. These are some of the results:
Rows
Rows / Second
20,000
476
51,987
456
377
702
50,000
704
133,276
1,293
694
1,211
100,000
1,369
282,818
2,643
1,388
2,525
150,000
2,027
421,581
3,798
3,603
408
577
400
742
735
1,402
1,373
1,449
1,470
2,459
2173
4,093
2,142
4,053
This test indicates that one selection of 100,000 records is about three times as fast as four selections of 20,000 records each. So if possible, get all the information you need in one selection instead of going back to the database many times.