Re: [SQL] limit 1 and functional indexes: SOLVED

2004-01-30 Thread Alexandra Birch
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: viernes, 30 de enero de 2004 7:08 > > Yeah, the problem with functional indexes is that the optimizer doesn't have > any clue how the records are distributed since it only has statistics for > columns, not your expression. Notice it's est

Re: [SQL] limit 1 and functional indexes

2004-01-29 Thread Alexandra Birch
> > > > Postgres choses the wrong index when I add limit 1 to the query. > > This should not affect the index chosen. > > I don't know the complete answer to your question, but since no one else > has commented I will answer what I can. Thanks - your reply is apreciated :) > It IS reasobable for

[SQL] limit 1 and functional indexes

2004-01-28 Thread Alexandra Birch
Hi, Postgres choses the wrong index when I add limit 1 to the query. This should not affect the index chosen. I read that functional indexes are sometimes not chosen correctly by optimizer. Is there anything I can do to always use the functional index in the following queries? Query with limi