Ragnar a écrit :
Do you think the problem is with the indexes ?
I guess so. are you sure about the index on t1.uid?
what are the column definitions for t1.uid and t2.uid ?
are they the same ?
Man, no !!!
I just checked and indeed, no index on this column. I probably dropped
it lately.
Thanks Ragnar.
(t1.uid and t2.uid were the same, character(32) columns)
you should ba able to get a plan similar to:
Merge Join (cost=0.00..43.56 rows=1000 width=11)
Merge Cond: ("outer".uid = "inner".uid)
-> Index Scan using t1i on t1 (cost=0.00..38298.39 rows=2000035
width=10)
-> Index Scan using t2i on t2 (cost=0.00..26.73 rows=1000 width=5)
what postgres version are you using ?
Ooops, forgot that too : 8.1.4
I am creating the index right now, I'll tell you if this fixes the problem.
Thanks for your help !
--
Arnaud