| From: | Arnaud Lesauvage <thewild(at)freesurf(dot)fr> | 
|---|---|
| To: | Ragnar <gnari(at)hive(dot)is> | 
| Cc: | pgsql-performance(at)postgresql(dot)org | 
| Subject: | Re: Slow update with simple query | 
| Date: | 2006-12-13 11:35:04 | 
| Message-ID: | 457FE568.8010302@freesurf.fr | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-performance | 
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jens Schipkowski | 2006-12-13 12:18:09 | Re: Slow update with simple query | 
| Previous Message | Ragnar | 2006-12-13 11:20:03 | Re: Slow update with simple query |