| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Daniel Koch | Date: | November 18 2002 6:58pm |
| Subject: | Re: feature suggestion - indexes with "where" clause or similar | ||
| View as plain text | |||
On Mon, 2002-11-18 at 12:29, Jeremy Zawodny wrote: > > If I've got you right status can have values 0 or 1. In this case > > you can just use " SELECT ... WHERE status=1 .." (index wil be used) > > or "SELECT .. WHERE status=0 .." (index will not be used, because > > scan the whole table will be faster to retrieve 99,9% of rows) > > depends on what you want to get. > > I'd like to second Nathan's request. > > Just because MySQL is smart enough to not use an index when 99% of the > rows would match doesn't mean that this is an unnecessary request. > It'd be a great optimization it MySQL could "know" not to bother > indexing those records. It'd save a lot of space and CPU time on > larger data sets. > > Jeremy I think this problem could be solved by implementing a BITMAP index, like Oracle. They're perfect for indexing boolean true/false columns or any column that has a small number of possible values. -- Daniel Koch <dkoch@stripped>
| Thread | ||
|---|---|---|
| • feature suggestion - indexes with "where" clause or similar | Nathan Neulinger | 15 Nov |
| • re: feature suggestion - indexes with "where" clause or similar | Egor Egorov | 18 Nov |
| • Re: feature suggestion - indexes with "where" clause or similar | Jeremy Zawodny | 18 Nov |
| • Re: feature suggestion - indexes with "where" clause or similar | Daniel Koch | 18 Nov |
| • RE: feature suggestion - indexes with "where" clause or similar | Dean Harding | 18 Nov |
| • Re: feature suggestion - indexes with "where" clause or similar | Jeremy Zawodny | 18 Nov |
| • RE: feature suggestion - indexes with "where" clause or similar | Nathan Neulinger | 18 Nov |
| • Re: feature suggestion - indexes with "where" clause or similar | Michael T. Babcock | 18 Nov |
| • Re: feature suggestion - indexes with "where" clause or similar | Daniel Koch | 19 Nov |
| • Re: feature suggestion - indexes with "where" clause or similar | Benjamin Pflugmann | 19 Nov |
| • Re: feature suggestion - indexes with "where" clause or similar | Dan Nelson | 19 Nov |
