> > > >maybe this is a silly question but how useful it is to create indexes
> > >>columns containing only values 0 and 1 (true and false)?
> > >
> > > Perhaps, instead of the index, you might revise your schema a bit.
> > >
> > > Why do you have this boolean column? What are you trying to
> > > achieve?
> > >
> > I use boolean columns as a flags mostly to mark records as 'exported'.
> > example I have table 'Transactions' and I have to export data for some
> > our customers (never for all of them).
> Right. Flags. IMO, flags are bad.
> And, as you noticed, it will slow down any queries because a flag cannot
> be indexed properly.
> Instead, why create a table
> TransactionID <primary key>
> This can be indexed and will be fast if you want to get info about
> any exported transactions.
PS: if "being exported" is the final stage in the process, you might want
to consider "being not exported" as the triggering condition and store
that instead. That way, you can always quickly find the not-yet exported
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL