[VSDK] Specifying a secondary index?

Eric Forget forgete at cafederic.com
Sat Jul 3 01:19:06 CDT 2004


Ruslan,
 
>> I'm starting to have speed issue with one table that has 32017 records. The
>> problem happens with a query like this:
>> 
>> SELECT DISTINCT LowerName, Name FROM Keyword WHERE Keyword.LowerName <> ''
>> ORDER BY LowerName
>> 
>> It also happens with a cursor->Add();
>> 
>> The problem happens only the first time. With Sampler I have been able to
>> figure out the Valentina Stack:
>> 
>> ...
>> 
>> FBL_SecondaryIndex::BuildIndex()
>> FBL_SecondaryIndex::OpenFirstTime()
>> FBL_SecondaryIndex::Open()
>> 
>> So it looks like that an index has to be rebuild on each launch of my
>> application!
>> 
>> Is there a way to specify such index to be persistent like the others?
> 
> Of course.
> 
> 1) If you set flag fIndxed, then index must be persistent.

I was assuming 2) to work so I've been a bit lazy on that. To make sure the
problem is not related to that I've added it to all the fields of my table.
With no success...
 
> 2) even if Valentina automatically index some NOT indexed field, then
> Valentina 1.x do not kill that index, and field imply become indexed.
> 
> 
> So check this. After close of app, open db in VAPP.
> Is the field marked as indexed?
> It must be.
> 
> Try do not search from VAPP. Works?

They are marked as indexed...
 
> 3) may be YOUR code somehow remove flag fIndxed?

I do not touch that outside the constructor of the field in the .h... So if
it is changing it should be memory corruption...
 
> 4) another case when Valentina self rebuild index -- if it find that number
> of records in table differ from number of index records.

How can that happens?

Also, is it normal for a 504 MB database having a 3.2 MB index file?

Éric 

___________________________________________________________________

 Eric Forget                       Cafederic
 ForgetE at cafederic.com             <http://www.cafederic.com/>

 Fingerprint <86D5 38F5 E1FD 5D9C 71C3  BAA3 797E 70A4 6210 C684>




More information about the Valentina mailing list