pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Guillaume Smet <guillaume_ml@smet.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: josh@agliodbs.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Bad plan after vacuum analyze
Date: Wed, 11 May 2005 22:59:40 +0200
Message-ID: <4282723C.5080903@smet.org> (raw)
In-Reply-To: <17017.1115843555@sss.pgh.pa.us>
References: <42823F94.8050009@smet.org>
<200505111110.15983.josh@agliodbs.com>
<13964.1115837926@sss.pgh.pa.us>
<42825DBB.7000703@smet.org>
<14301.1115840296@sss.pgh.pa.us>
<4282638E.2020307@smet.org>
<17017.1115843555@sss.pgh.pa.us>
Josh, Tom,
Thanks for your explanations.
> In the meantime it seems like the quickest answer for Guillaume might
> be to try to avoid keeping any NULLs in parent_application_id.
I can't do that as the majority of the applications don't have any
parent one. Moreover, we use a third party application and we cannot
modify all its internals.
Anyway, I tried to work on the statistics as you told me and here are
the results:
ccm_perf=# ALTER TABLE acs_objects ALTER COLUMN object_id SET STATISTICS 30;
ALTER TABLE
ccm_perf=# ANALYZE acs_objects;
ANALYZE
ccm_perf=# \i query_section.sql
... correct plan ...
Total runtime: 0.555 ms
So I think I will use this solution for the moment.
Thanks a lot for your help.
Regards
--
Guillaume
view thread (10+ messages) latest in thread
Message-ID: <4282723C.5080903@smet.org> Permalink: ../4282723C.5080903@smet.org/ Also on: postgresql.org/message-id/4282723C.5080903@smet.org ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-performance@postgresql.org Cc: guillaume_ml@smet.org, tgl@sss.pgh.pa.us, josh@agliodbs.com Subject: Re: Bad plan after vacuum analyze In-Reply-To: <4282723C.5080903@smet.org> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox