Re: Searching union views not using indices

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Michal Taborsky <michal(dot)taborsky(at)mall(dot)cz>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Searching union views not using indices
Date: 2005-11-04 15:12:57
Message-ID: 20051104151257.GA89760@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Nov 04, 2005 at 12:38:30PM +0100, Michal Taborsky wrote:
> SELECT object_id FROM commonview WHERE link_id=1234567
>
> The result is sequential scan on all tables, append, sort and then
> filter scan on this whole thing. Which of course is slow as hell. We use
> version 8.0.2.

I couldn't duplicate this in 8.0.4; I don't know if anything's
changed since 8.0.2 that would affect the query plan. Could you
post the EXPLAIN ANALYZE output? It might also be useful to see
the output with enable_seqscan disabled.

Have the tables been vacuumed and analyzed recently?

--
Michael Fuhr

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-11-04 15:21:49 Re: insert performance for win32
Previous Message Merlin Moncure 2005-11-04 15:12:23 Re: insert performance for win32