From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "Decibel!" <decibel(at)decibel(dot)org>, "Gregory Stark" <stark(at)enterprisedb(dot)com> |
Cc: | "Josh Berkus" <josh(at)agliodbs(dot)com>, "Dann Corbit" <DCorbit(at)connx(dot)com>, "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Mark Wong" <markwkm(at)gmail(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Greg Smith" <gsmith(at)gregsmith(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, <pgsql-hackers(at)postgresql(dot)org>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Simple postgresql.conf wizard |
Date: | 2008-11-26 21:48:03 |
Message-ID: | 492D6FB3.EE98.0025.0@wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>> Decibel! <decibel(at)decibel(dot)org> wrote:
> On Nov 25, 2008, at 7:06 PM, Gregory Stark wrote:
>>> The thought occurs to me that we're looking at this from the
>>> wrong side of the
>>> coin. I've never, ever seen query plan time pose a problem with
>>> Postgres, even
>>> without using prepared statements.
>>
>> I certainly have seen plan times be a problem. I wonder if you have
>> too and
>> just didn't realize it. With a default_stats_target of 1000 you'll
>> have
>> hundreds of kilobytes of data to slog through to plan a moderately
>> complex
>> query with a few text columns. Forget about prepared queries, I've
>> seen plan
>> times be unusable for ad-hoc interactive queries before.
>
> Can you provide any examples?
>
> And no, I've never seen a system where a few milliseconds of plan
> time difference would pose a problem.
When we first brought the statewide circuit court data onto
PostgreSQL, on some early version of 8.1, we tried boosting the
statistics targets for a few dozen important columns, and had to back
off because of plan times up in the 20 to 30 second range. I hadn't
tried it lately, so I just gave it a go with switching from a default
statistics target of 10 with no overrides to 1000.
The plan time for a fairly complex query which is run over 300,000
times per day went from 55 ms to 315 ms; however, with the particular
search criteria I used (which I knew to be "challenging") the run time
went from something which exceeded my patience tolerance for the test
(over two minutes) to two seconds, so a better plan was definitely
found.
I'm not sure what this suggests in terms of a good default value, but
just to put some numbers out there from a real-world application....
-Kevin
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2008-11-26 21:52:06 | Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1 |
Previous Message | Jaime Casanova | 2008-11-26 21:38:11 | where is the last hot standby patch? |