Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread DbIsam use indexs when i work on DevExpress cxGrid 6 ?
Thu, Apr 17 2008 4:10 AMPermanent Link

"Enrico Ghezzi"
Hi

i must use a DevExpress Grid 6.xx with DbIsam table ( locale )

it's a very very very big database ^^

i have created all lndex  for all fields, already.


when i use internal Incremental seach, or i grouping a field in cxGrid

the devexpress code ( i think ..)   make a "Locate" command.


DbIsam use the index for resolve this locate ?


Thu, Apr 17 2008 5:09 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Enrico


If there's an index available DBISAM should use it. Remember this will not apply to fields that are in a compound index where they are not the first field in the index.


Roy Lambert [Team Elevate]
Thu, Apr 17 2008 5:39 AMPermanent Link

"Enrico Ghezzi"
> If there's an index available DBISAM should use it. Remember this will not
> apply to fields that are in a compound index where they are not the first
> field in the index.

i'm trying... but i see more problems...   Frown

I'm Using TDBISAM Table 4.2x , cxGrid in GRIDEMODE = True.

open table is fast,

i can see data grid on screen , fast..

but

when i press a single key , in  a column ( with a single index present in
database )

start the Incremetal search of Grid6 , and stop all....................

program is ULTRA-SLOW ( don't use any Index )

It's not usable.
---------------

I'm tring use TdbIsamQuery, now

SELECT * FROM MYDATABASDE order by MYFIELDSTRING NOCASE
( MYFIELDSTRING index is present )

It's fast when open/show table , but Not usable when grid6 make any locate.

note :
All my Indexs are CASE-INS = YES


HINT ?
Thu, Apr 17 2008 6:21 AMPermanent Link

"Enrico Ghezzi"
add :

i have try this code :

VERY SLOW :
tblMyTable.Locate('MYFIELDSTRING','TEST',[loPartialKey])

FAST :
tblMyTable.Locate('MYFIELDSTRING','TEST',[loCaseInsensitive,loPartialKey])


Grid6 , i think don't use  loCaseInsensitive option

How i can to force a Isamtable / Isamquery ad work

ONLY and ALWAYS in loCaseInsensitive mode ?



Thu, Apr 17 2008 6:27 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Enrico


Is this a DBISAM problem or a grid problem? My bet would be the grid. Try using table.Locate(....) and see what the speed is. If its good then the problem is the grid and since I don't use DevEx I can't help, but maybe someone else in this ng can.

Roy Lambert [Team Elevate]
Thu, Apr 17 2008 7:06 AMPermanent Link

From what I've read here, you need to make sure your index matches your query. Thus
if you index is case insensitive, then so much your query (locate). If you want to
do it sensitive too, then add an index that is case sensitive.

/Matthew Jones/
Thu, Apr 17 2008 9:32 AMPermanent Link

"Enrico Ghezzi"
i have found the problem.

i have debugged cxGrid source ( cxDBData ,cxCustomData.. )

for incremental search cxgrid don't make a "locate".

there is a :


DO WHILE ...  next        *.*

function TcxDBDataProvider.DoLocate(const ASubText: string; AForward, ANext:
Boolean): Boolean;

         while (not EOF or ANext or AStartEOF) and
           ((AStartPos = '') or (Self.CompareBookmarks(Bookmark,
AStartPos) <> 0)) do
         begin
           AStartEOF := False;
           if IsCurrentEqual then
           begin
             Result := True;
             Break;
           end;
           CalcNextRecord;
           if AExit then Break;
         end;


ASD ^^"

WHY DON'T THERE IS  A LOCATE ??????????????????????????????????????
Thu, Apr 17 2008 10:07 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Enrico


>WHY DON'T THERE IS A LOCATE ??????????????????????????????????????

No point in asking here - Tim didn't write the grid Smiley

Try the DevEx website/ngs.

Also with a query if you have a case insensitive index use the following form

SELECT xxxx FROM tbl WHERE UPPER(fieldname) = UPPER(data)

The two uppers let DBISAM know what's going on.

Roy Lambert [Team Elevate]
Thu, Apr 17 2008 1:31 PMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

Enrico:

<<I'm Using TDBISAM Table 4.2x , cxGrid in GRIDEMODE = True.
<<open table is fast, i can see data grid on screen , fast..

Yes...that will be fast because in GRIDMODE = True it will only load
the initial number of records you specify (I believe the default is 100
records.)

<<but when i press a single key , in  a column ( with a single index
<<present in database ) start the Incremetal search of Grid6 , and stop
<<all....................
<<
<<program is ULTRA-SLOW ( don't use any Index )

That is because in order to perform an incremental search, a sorting
action, a filtering action, etc., the DevEx QuantumGrid needs to load
ALL the records from your database. You stated it was a very large
database. Assuming for a second there are 100,000 records, it will load
ALL 100,000 records by switching itself to GRIDMODE = False so that ALL
the records are available for sorting, filtering, searching, etc..
Anything over approximately 5,000 records results in slow performance
of the QuamtumGrid if GRIDMODE = False.

This is not a DBISAM issue but rather the way the DevEx QuantumGrid
works by default. It will still use indices you specify however the
loading of all the records is what makes it run "ULTRA-SLOW."

HTH...

--
Regards,
Jan Ferguson [Team Elevate]
Image