> An index on (user, domain) is perfectly useless for the above query,
> because the user field isn't mentioned anywhere in the query. An index
> on domain alone could be used, though, and should be pretty effective.
> (We do have some performance problems if you get into dozens of OR
> terms, but for just a couple, no sweat.)
Heh heh, oops. Index on domain alone is what I meant, sorry, I was trying to
mix two different examples in my head without actually running them. :)
My main concern is with the use of the 'or' in the query. My experience is
mostly with Progress -- it (at least the ancient version that I'm used to)
can't utilize the index on a field _at all_ if your query uses an 'or' on that
field. As a result, I've become extremely cautious about doing this with
Postgres. You seem to be saying that it's no a big deal -- that the index will
still be utilized and that performance will not suffer significantly. Is this
something that I can finally forget worrying about?
Thanks for the help and the speedy reply.
--
Alex Howansky
alex@wankwood.com
http://www.wankwood.com/