Re: [SQL] planner used functional index in 7.3.6, now does a seq

2006-11-19 Thread Chris Tennant
doh. I copied an earlier definition of the function into the email. Thanks for catching my (moronic) error, and my apologies for distracting everyone on the list. However, the underlying problem remains: even with the correct function definition, the query executes thousands of times

Re: [SQL] planner used functional index in 7.3.6, now does a seq

2006-11-19 Thread Tom Lane
Chris Tennant [EMAIL PROTECTED] writes: ... the underlying problem remains: even with the correct function definition, the query executes thousands of times slower on 7.4 than on 7.3 Well, note that 7.4 thinks it's finding a *better* plan --- the estimated cost is about half what it was in

Re: [SQL] planner used functional index in 7.3.6, now does a seq

2006-11-19 Thread Chris Tennant
Tom, Thank you so much for your help. Upgrading to 8.1.5 did the trick, the query now has a better plan, and executes quickly: QUERY PLAN