Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Paradox > Query directly ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 16 Topic 1290 of 1396
Post > Topic >>

Query directly from secondary index

by "Jim Moseley" <jmose@[EMAIL PROTECTED] > Oct 18, 2007 at 02:03 AM

Greetings all.  

I think I've stumbled onto a way to speed up queries, but am looking for
a second opinion.

I have a table with several secondary indexes, one of which contains the
'Name' & 'Key' fields.  I want to perform a generic match on the 'Name'
field,
to return all rows that have Name = "..Jim..".  

If I perform my query on the DB file, it will open & search the entire
table,
ignoring the 2nd index because of the wildcards.

If I perform my query directly against the appropriate XG* file, it will
perform the query on a 'mini-table' of just the Name & Key columns, which
should be much smaller than the entire DB table.

Does this make sense?

For example:

Query
Customer.XG1 | Key | Name |
             | Check | CheckPlus ..Jim.. |
endQuery

Note that I tried to open a tcursor against the 'Customer.XG1' file & it
wouldn't let me.  The query engine must work differently.

Extra credit: by doing a enumIndexStruct on the table, does the iIndexID
column map directly to the 'XG*' name, as 'X' + string(hex(iIndexID + 1))?
 I'm guessing this is the case, because the iIndexID values start with 256
and go up by 1 for each additional index.

Thanks,
Jim Moseley
 




 16 Posts in Topic:
Query directly from secondary index
"Jim Moseley" &  2007-10-18 02:03:52 
Re: Query directly from secondary index
"Anders Jonsson"  2007-10-18 08:40:54 
Re: Query directly from secondary index
"Jim Moseley" &  2007-10-18 08:16:21 
Re: Query directly from secondary index
"Anders Jonsson"  2007-10-18 17:20:39 
Re: Query directly from secondary index
"Tony McGuire"   2007-10-18 09:53:54 
Re: Query directly from secondary index
"Anders Jonsson"  2007-10-18 19:05:42 
Re: Query directly from secondary index
"Jim Moseley" &  2007-10-18 13:53:37 
Re: Query directly from secondary index
"Rick Rans" <  2007-10-18 14:44:50 
Re: Query directly from secondary index
"Steven Green"   2007-10-18 05:47:56 
Re: Query directly from secondary index
"Jim Moseley" &  2007-10-18 08:05:38 
Re: Query directly from secondary index
"Steven Green"   2007-10-18 09:15:42 
Re: Query directly from secondary index
"Bertil Isberg"  2007-10-18 21:26:37 
Re: Query directly from secondary index
"Jim Moseley" &  2007-10-18 16:36:19 
Re: Query directly from secondary index
"Jim Moseley" &  2007-10-18 16:46:26 
Re: Query directly from secondary index
"Jim Moseley" &  2007-10-18 17:17:11 
Re: Query directly from secondary index
"Bertil Isberg"  2007-10-19 18:55:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 5:38:13 CDT 2008.