Re: Simple postgresql.conf wizard - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Simple postgresql.conf wizard
Date
Msg-id 493F9BF6.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Re: Simple postgresql.conf wizard  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>> Tom Lane <tgl@sss.pgh.pa.us> wrote: 
> [ a bit off-topic for the thread, but ... ]
> 
> "Kevin Grittner" <Kevin.Grittner@wicourts.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


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Sync Rep: First Thoughts on Code
Next
From: Tom Lane
Date:
Subject: Re: WIP: default values for function parameters