On my 7.4.5 box I had the following in the postgresql.conf file:
enable_seqscan = true (this is the default setting) 7.4.5 had no problems using the indexes with this setting = true
on 8.0RC1 it refused to use certain indexes if enable_seqscan = true
I set this value to false on 8.0 and my performance came back to the 7.4.5 levels.
Is there some other setting in the conf file that would affect the optimizer?
The weird part is if I ran each query in the function by itself Explain would always report the index being used, but when run in the context of the function the indexes where not being used.
Thanks,
Tony Caduto
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend