From: | Viktor Rosenfeld <rosenfel(at)informatik(dot)hu-berlin(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Indexes not used in DELETE |
Date: | 2009-05-08 10:17:53 |
Message-ID: | A24EBF1D-F70A-4300-B27E-BCD86CBAF828@informatik.hu-berlin.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi Tom,
I should have looked at the analyzed plan first. The culprit for the
slow query were trigger function calls on foreign keys.
Ciao,
Viktor
Am 08.05.2009 um 01:06 schrieb Tom Lane:
> Viktor Rosenfeld <rosenfel(at)informatik(dot)hu-berlin(dot)de> writes:
>> -> Seq Scan on corpus toplevel
>> (cost=0.00..1.39 rows=1 width=54)
>> Filter: (top_level AND (id =
>> 25::numeric))
>
>> Specifically, I'm wondering why the innermost scan on corpus
>> (toplevel) does not use the index idx_corpus__toplevel
>
> The cost estimate indicates that there are so few rows in corpus
> that an indexscan would be a waste of time.
>
>> and why the
>> join between corpus (toplevel) and corpus (child) is not a merge join
>> using the index corpus_pre_key to access the child table.
>
> Same answer. Populate the table and the plan will change.
>
> regards, tom lane
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org
> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Wakeling | 2009-05-08 13:46:22 | Statistics use with functions |
Previous Message | Rohan Pethkar | 2009-05-08 05:32:14 | Rohan Pethkar sent you a Friend Request on Yaari |