I know that it does not make really sense to do this on a big varchar field, but sometimes it is needed, because of many searches on that and so on, and the index statistic for that field gives me 0.00042... and that is a good value for an index and there are only 2900 Records in that Table.
I've checked it on Zeos 6.6 as well now and the performance decrease also happens there. As soon as i do SBEZEICHNUNG Asc on the IndexFieldNames on ZTable.
But i need this sort ordering on that field, and the field also could not be shorter than 500.
There should be also mentioned that this performance decrease only happens if it goes over the network. If i have a Firebird 2.1.5 local on my laptop it takes about 1 second.
Smart refresh using zeos components
Moderators: gto, EgonHugeist
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
slai,
do you have an index on SBEZEICHNUNG? Now we do not longer talk about a Zeos-related issue. Anybody else? Some suggestions, hints???
do you have an index on SBEZEICHNUNG? Now we do not longer talk about a Zeos-related issue. Anybody else? Some suggestions, hints???
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
So, mainly the Performance Issues came from ZTable -> Refres, IndexFieldNames and Sorting. Is it correct that when i set SortType it imediatly begins with loading all datas and this SortType? Because i do first .refresh then setting SortedFields and then SortType. Now if 2 times refreshing then it is an imense overhead. Is there a possibility to set SortType and SortedFields and then just 1 refresh?
Thx for reply!
Thx for reply!
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
slai,
Why don't you set these options before you open the table? Do you use Master-Detail relations? The ZTable component is a simple dataset which fetches all rows. You can supress this behavior by using the TZQuery and your own statement with a order clause. I've still my problems to understand what exactly you're doing. Again is there an index for field SBEZEICHNUNG avaiable?
Why don't you set these options before you open the table? Do you use Master-Detail relations? The ZTable component is a simple dataset which fetches all rows. You can supress this behavior by using the TZQuery and your own statement with a order clause. I've still my problems to understand what exactly you're doing. Again is there an index for field SBEZEICHNUNG avaiable?
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi,
As far as I remember these IndexFieldnames and Sorting stuff is clientside sorting inside the dataset buffers. So indeed, it's logical that all data needs to be loaded at refresh time and when changing these settings.
When loading bigger datasets it's probably better to let the query do the sorting. In that case the data can be fetched in batches. But make sure you don't navigate to the end of the dataset in your code. (eg. by using recordcount, ds.last, ...)
As far as I remember these IndexFieldnames and Sorting stuff is clientside sorting inside the dataset buffers. So indeed, it's logical that all data needs to be loaded at refresh time and when changing these settings.
When loading bigger datasets it's probably better to let the query do the sorting. In that case the data can be fetched in batches. But make sure you don't navigate to the end of the dataset in your code. (eg. by using recordcount, ds.last, ...)