From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Edmund Dengler <edmundd(at)eSentire(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] INHERITS and planning |
Date: | 2005-06-16 10:22:21 |
Message-ID: | 1118917341.3645.211.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Thu, 2005-06-16 at 00:55 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > Looks bad... but how does it look for 1000 inherited relations? My
> > feeling is that we should not be optimizing the case above 1000
> > relations. That many partitions is very unwieldy.
>
> Well, it's not so much that I care about queries with 1000+ relations,
> as that this is a good way to stress-test the code and find out where
> the performance issues are. There are many thousand lines of code that
> can never be performance-sensitive, but to expose the ones that are
> it helps to push the envelope a bit.
I very much agree and I also appreciate you taking the time to look into
this since it clearly has an effect on the usefulness of partitioning. I
wanted to give my opinion that more than 1000 is not a frequent use
case.
> Until Neil fixed the list.c package in 8.0, we had pretty much zero
> chance of avoiding O(N^2) or worse behavior on almost any measure of
> query size N that you cared to name; because most of the internal data
> structures depend on lists. (You do know that Postgres was once written
> in Lisp, right?) Now that that basic issue is taken care of, it's worth
> looking at secondary bad behaviors ... I've been doing some hacking in
> this area lately, but it's not all fixed yet.
Yes, know about that; I agree with the general principles you discuss.
Your suggested fix to the 2000+ inherited relation problem seemed like
it would apply to an area that most people would never use, yet would
have an effect on anybody using LockAcquire. IMHO that is not worth the
effort or risk, and that is from somebody that you know has been
involved in tracking down O(N^2) behaviour in other parts of the code.
Best Regards, Simon Riggs
From | Date | Subject | |
---|---|---|---|
Next Message | Jiří Němec | 2005-06-16 10:55:08 | PostgreSQL log analyzer |
Previous Message | Craig Bryden | 2005-06-16 10:21:44 | Dynamic SQL |
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2005-06-16 10:42:40 | Re: Autovacuum in the backend |
Previous Message | Hans-Jürgen Schönig | 2005-06-16 09:59:49 | Re: Autovacuum in the backend |