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 similarNathan Neulinger15 Nov
  • re: feature suggestion - indexes with "where" clause or similarEgor Egorov18 Nov
    • Re: feature suggestion - indexes with "where" clause or similarJeremy Zawodny18 Nov
Re: feature suggestion - indexes with "where" clause or similarDaniel Koch18 Nov
  • RE: feature suggestion - indexes with "where" clause or similarDean Harding18 Nov
    • Re: feature suggestion - indexes with "where" clause or similarJeremy Zawodny18 Nov
RE: feature suggestion - indexes with "where" clause or similarNathan Neulinger18 Nov
  • Re: feature suggestion - indexes with "where" clause or similarMichael T. Babcock18 Nov
    • Re: feature suggestion - indexes with "where" clause or similarDaniel Koch19 Nov
      • Re: feature suggestion - indexes with "where" clause or similarBenjamin Pflugmann19 Nov
        • Re: feature suggestion - indexes with "where" clause or similarDan Nelson19 Nov