From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alessandro Baretta <a.baretta@barettadeit.com>
Cc: Matteo Beccati <php@beccati.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: 500x speed-down: Wrong query plan?
Date: Mon, 09 Jan 2006 13:41:05 -0500
Message-ID: <6719.1136832065@sss.pgh.pa.us> (raw)
In-Reply-To: <43C28DEA.60801@barettadeit.com>
References: <43C26A5F.7040702@barettadeit.com>
<43C27AFA.7060604@beccati.com>
<43C28DEA.60801@barettadeit.com>
Alessandro Baretta <a.baretta@barettadeit.com> writes:
> Matteo Beccati wrote:
>> Are you sure that you recentrly ANALYZED the table "ubicazione"? If so,
>> try to increase statistics for the id_ente column.
> No, this is not the problem. I increased the amount of statistics with ALTER
> TABLE ... SET STATISTICS 1000, which is as much as I can have.
What Matteo wanted to know is if you'd done an ANALYZE afterward. ALTER
TABLE SET STATISTICS doesn't in itself update the statistics.
What do you get from
EXPLAIN SELECT * FROM articolo WHERE articolo.xdbs_modified > '2006-01-08 18:25:00+01';
I'm curious to see how many rows the planner thinks this will produce,
and whether it will use the index or not.
Also, I gather from the plan choices that the condition id_ente = 'dmd'
isn't very selective ... what fraction of the rows in each table
satisfy that?
regards, tom lane
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: tgl@sss.pgh.pa.us, a.baretta@barettadeit.com, php@beccati.com
Subject: Re: 500x speed-down: Wrong query plan?
In-Reply-To: <6719.1136832065@sss.pgh.pa.us>
* 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