Re: Simple postgresql.conf wizard

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Josh Berkus" <josh(at)agliodbs(dot)com>,<jd(at)commandprompt(dot)com>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Greg Smith" <gsmith(at)gregsmith(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Simple postgresql.conf wizard
Date: 2008-12-10 16:37:42
Message-ID: 493F9BF6.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> [ a bit off-topic for the thread, but ... ]
>
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> I'll attach the query and plan. You'll note that the query looks a
>> little odd, especially all the (1=1) tests.
>
> FWIW, it would be better to use "TRUE" as a placeholder in your
> generated queries. I don't suppose this would make a huge
percentage
> difference in such complicated queries, but in and of itself there
are
> a lot of cycles spent to parse "1=1" and then reduce it to constant
TRUE.

Thanks, I'll put in a request for enhancement for our framework.
(Not all databases we support handle boolean literals, so we need a
few lines in our plugin layer.)

In case anyone cares in terms of interpreting the timings I posted, on
the server where I just tested this change, the average plan time
dropped from 65.0 ms to 63.7 ms -- a 2% improvement. Eliminating
"pretty" whitespace shaved off another 0.2 ms, or 0.3%.

So, worth doing on our end as a tuning measure, but not a significant
distortion in terms of the issues discussed on the thread.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-12-10 16:47:17 Re: WIP: default values for function parameters
Previous Message Simon Riggs 2008-12-10 14:59:45 Re: Sync Rep: First Thoughts on Code