From: slapo@centrum.sk
To: Igor Neyman <ineyman@perceptron.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: RE: [PERFORM] Re: [PERFORM] Sub-optimal plan for a paginated query on a view with another view inside of it.
Date: Wed, 07 Aug 2013 16:42:50 +0200
Message-ID: <20130807164250.26C21834@centrum.sk> (raw)
In-Reply-To: <A76B25F2823E954C9E45E32FA49D70EC1BBF38D9@mail.corp.perceptron.com>
References: <20130802154316.59167BB5@centrum.sk>
<CAFj8pRAc-sk8QigQJJn+9MgLJmxU7pjH90Eqd47tAF_1HsGOXQ@mail.gmail.com>
<20130807144239.654353D3@centrum.sk>
<A76B25F2823E954C9E45E32FA49D70EC1BBF38D9@mail.corp.perceptron.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
You're right, it does... but it's quite odd, because I re-ran the explain-analyze statement and got the same results.
Still, the query now runs for about a second as mentioned before, so it's almost like something's missing from the explain, but I'm certain I copied it all.
I did this via pgadmin, but that shouldn't matter, should it?
Thank you,
Peter Slapansky
______________________________________________________________
> Od: Igor Neyman <ineyman@perceptron.com>
> Komu: "slapo@centrum.sk" <slapo@centrum.sk>, Pavel Stehule <pavel.stehule@gmail.com>
> Dátum: 07.08.2013 15:47
> Predmet: RE: [PERFORM] Re: [PERFORM] Sub-optimal plan for a paginated query on a view with another view inside of it.
>
> CC: "pgsql-performance@postgresql.org"
Your last explain analyze (with 3 settings set to 32) shows query duration 10ms, not 1sec.
Am I wrong?
Regards,
Igor Neyman
______________________________________________________________
From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of slapo@centrum.sk
Sent: Wednesday, August 07, 2013 8:43 AM
To: Pavel Stehule
Cc: pgsql-performance@postgresql.org
Subject: [PERFORM] Re: [PERFORM] Sub-optimal plan for a paginated query on a view with another view inside of it.
Good day,
I have included a link to the result of EXPLAIN ANALYZE. It's this one:
https://app.box.com/s/u8nk6qvkjs4ae7l7dh4h <https://app.box.com/s/u8nk6qvkjs4ae7l7dh4h;
Here's a link to Depesz's explain (if links to the site are okay):
http://explain.depesz.com/s/gCk <http://explain.depesz.com/s/gCk;
I have just tried setting geqo_threshold, join_collapse_limit and from_collapse_limit to 16, but it yielded no improvement.
Changing those three parameters to 32 did speed up the query from about 3.3 seconds to about a second (give or take 50 ms), which is a pretty good improvement, but not quite there, as I'm looking to bring it down to about 300 ms if possible. Changing those three settings to 48 yielded no improvements over 32.
Is there possibly something something else to tweak there?
Here's EXPLAIN ANALYZE output when the three settings have been set to 32:
http://explain.depesz.com/s/cj2 <http://explain.depesz.com/s/cj2;
Thank you.
Peter Slapansky
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: slapo@centrum.sk, ineyman@perceptron.com, pavel.stehule@gmail.com
Subject: Re: RE: [PERFORM] Re: [PERFORM] Sub-optimal plan for a paginated query on a view with another view inside of it.
In-Reply-To: <20130807164250.26C21834@centrum.sk>
* 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