Subject Re: [firebird-support] Question about index selectivity
Author Thomas Steinmaurer
>
> I have many tables containing integers which can either be 1 or 0. (true or false)
>
> My question is: if more than 90% of a field's data in some of these tables is going to be 0 and only 10% is 1, is it worth creating an index for that particular field? I suppose that having an additional index will slow down inserts, but is it going to speed up my SELECTs?

If most of the time you are querying for the value 1, then an index will
speed up things, otherwise not.


--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/