Subject Re: [IBO] TIBOQUERY Problem
Author Andy Murphy
I know the DevExpress grids like the back of my hand. I've been through all
this sort of stuff.

Obviously if you are going to group the dataset in any form of grid you are
going to have to have all the records client side. That is not just a
DevExpress thing, its a common sense thing.

I have an App which is used and sold to over 2000 users in the UK which has
a read only database of 2.7million records and they can do vast searches
such as the whole of London (285,000) records, because they might want to
export this data into their own systems. I still allow people to group the
grid and go into LoadAll mode but I do it kinda cleverly.

This might help you, it works for me and my users. I set a variable integer
to between 0 and 5000. (this is kept in the system registry). It is usually
set to 1000.

Now because the vast majority of my users do 'sensible' searches i.e. a few
a few hundred to a few thousand records and in most cases less than that, I
wanted to give them the full use of the LoadAll grid with the grouping and
the auto-sort.

So I sample the data. I use IBOQuery1.MoveBy(VariableAbove) to check to see
if the dataset is bigger than the threshold we set above (1000 is nice and
quick on almost any pc/server). If its less than this then we have the full
dataset at the client anyway and I change the grid to LoadAll mode. If the
dataset is larger than this then I have the grid in PartialMode with no

Basically the maximum time the user ever waits is as long as it takes to
load the number of records specified in the variable above to the client

Oh and one other thing, because they all want a record count regardless of
the size, if we have gone over the threshold set above, I do a select
count(*) in another IBOQuery in a different thread, thus they are not wating
for the server to count the records, they can just get on with using the
system and the records count happens 10-20secs after which to be honest they
dont even notice the delay because they are looking at the data anyway.

Hope this helps.

PS if you wonder why this App isnt causing the same problem I have with the
new app, its written in D4 with IBO, so maybe its a Delphi6 with the new
DevExpress and IBO stuff thats causing it.