Is Select faster than Selectlist?
Posted: Thu Mar 19, 2020 2:26 pm
Hi,
I understand that Selectlist is faster than Select, but in the following case, Select is faster than Selectlist.
To read 1000 records from a physical file with 10,000 records using Server Module in IBM i:
Select reads 1000 records using With_key.
e.x.)
Select Fields(...) with_key(#Key)
Endselect
Selectlist reads 1000 records using Where from the working list to which all records of the file were added.
e.x.)
* #List has 10,000 records.
Selectlist #List Where(#Key = xxxxx)
Endselect
I understand that this Selectlist reads 10,000 records internally, but still believed that selectlist was faster than Select.
However, the fact is that Select is faster.
Is this due to the improved performance of IBM i Disk access?
Or is the Selectlist Where inefficient?
Can anyone explain this reason?
Regards,
Taku
I understand that Selectlist is faster than Select, but in the following case, Select is faster than Selectlist.
To read 1000 records from a physical file with 10,000 records using Server Module in IBM i:
Select reads 1000 records using With_key.
e.x.)
Select Fields(...) with_key(#Key)
Endselect
Selectlist reads 1000 records using Where from the working list to which all records of the file were added.
e.x.)
* #List has 10,000 records.
Selectlist #List Where(#Key = xxxxx)
Endselect
I understand that this Selectlist reads 10,000 records internally, but still believed that selectlist was faster than Select.
However, the fact is that Select is faster.
Is this due to the improved performance of IBM i Disk access?
Or is the Selectlist Where inefficient?
Can anyone explain this reason?
Regards,
Taku