Whether to use an index

Post Reply
MiniMe
Posts: 210
Joined: Thu Mar 15, 2001 4:30 pm

Whether to use an index

Post by MiniMe »

I have a table with 33 million rows. It has 25 indexes on it, Yeah ICK. Some may be unnecessary though as the columns have a value of either 1 or 0. Does having a btree index on those columns really matter since the data is so constrained? Is there anyway I can do some timed searches and force it not to use the index so I don't have to drop it and spend 2 hours recreating it?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Whether to use an index

Post by John »

Yes, you can change btreethreshold. That sets the threshold where it decides whether or not to use the index. By default if the query would look at more than half the records from the index it doesn't read in all the records from the index.
John Turnbull
Thunderstone Software
Post Reply