Speed of fetching records

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
jascha
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 14.10.2005, 14:31
Location: Füssen
Contact:

Speed of fetching records

Post by jascha »

I use my application with a Database on the Internet, thats why I have to reduce the amount of data transfered between application and database.

By now I found out that if I set Filtered:=true only the needed records are fetched, which is quite good and exactly what I want. But there are some problems with this.

1. RecordCount fetches all records and takes long
2. If I do TZQuery.Last it seems to also fetch all the Records till the end
or if I do RecNo:=10000 the same

Now I have looked at the PostgreSQL API and it seems to me that this is not necessary. There are API calls to return the number of fetched rows and to get a specific row by rownumber out of the resultset.

We could keep track of which records are already fetched and in the clients memory. So it would be possible to fill it part by part.

I haven´t looked at other APIs, but even if they have not the possibility. It still would be possible to move the code somewhere in databasedriver and let him choice which method is best to perform the task.

Do you think that is possible or am I missing something?
User avatar
fduenas
Zeos Dev Team
Zeos Dev Team
Posts: 132
Joined: 26.08.2005, 08:12
Location: Cancún

Post by fduenas »

Well if you you wan only to browse a record, its ok. But if you have a dbgrid, the it coould be difficult to achiev if you dont´browse other recods. Yes maybe there could be another way, but for now this the way that all drivers can work. Maybe it can be done but whould require a little bit of work to apply the correct behaviour to each protocol.
Post Reply