Re: Indexes not used in DELETE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Viktor Rosenfeld <rosenfel(at)informatik(dot)hu-berlin(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Indexes not used in DELETE
Date: 2009-05-07 23:06:56
Message-ID: 6572.1241737616@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2009-05-08 02:20:12 Re: Transparent table partitioning in future version of PG?
Previous Message David Blewett 2009-05-07 22:56:35 Re: Bad Plan for Questionnaire-Type Query