Re: decrease my query duration

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: decrease my query duration
Date: 2013-07-05 18:51:11
Message-ID: 1373050271243-5762758.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Carpio wrote
> Thank you for your time

You're not likely to get too many if any takers who want to try and decipher
that mess you call a query/explain. Especially since you've made it pretty
much impossible to read by removing/obfuscating information. It is not
self-contained and we have no idea what the goal of the query is without
actually reading it. At minimum you should write a paragraph or two
describing your schema, problem, and what broadly you are trying to
accomplish with the supplied query.

My first instinct is that you table/schema layout simply sucks and that you
are going to have to either re-design that or put considerable effort into
manual caching or turn it into a function so that you can help the planner
out.

Ignore the whole "it runs too slowly" for the time being and create
self-contained example that at least runs and where the query can actually
be read. In addition maybe try performing surgery on the query so that a
lot of the detail is removed without losing the structure. That way you and
others can much more quickly view this modified query - even if it doesn't
run - and get a feel for what it is doing and how it goes about doing it.
You'd still need table definitions and sample data even for this.

The whole "I want help but I can't (or won't take the time to) actually tell
you what I am doing" position doesn't usually work for these kinds of
problems.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/decrease-my-query-duration-tp5762622p5762758.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ketana Patel 2013-07-05 19:16:34 Re: General Query on Roles - Reg
Previous Message Vick Khera 2013-07-05 17:48:04 Re: Application locking