Re: Query Optimizer + Parallel Operators

Lists: pgsql-hackers
From: "Felix Schmidt (at) Oracle" <felix(dot)x(dot)schmidt(at)oracle(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Query Optimizer + Parallel Operators
Date: 2011-01-26 14:46:49
Message-ID: 4D4033D9.6090106@oracle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Everybody,

I'm interested in the query optimizer of PostgreSQL DB. Where could I
find useful documentation or could you send me a pointer in the source code?

What kind of parallelism does PostgreSQL use for operators, like
selection or join?

Thank you
- felix


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Felix Schmidt (at) Oracle" <felix(dot)x(dot)schmidt(at)oracle(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Query Optimizer + Parallel Operators
Date: 2011-01-26 23:14:54
Message-ID: 4D40AAEE.1070103@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Felix,

> I'm interested in the query optimizer of PostgreSQL DB. Where could I
> find useful documentation or could you send me a pointer in the source code?
>
> What kind of parallelism does PostgreSQL use for operators, like
> selection or join?

Normally we're very helpful with this kind of information ... it's all
public after all ... but I have to say that the domain you're e-mailing
from makes it a little hard to give you a direct answer.

Could you maybe give us a little information about what you want this
information for?

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com


From: Dusan Misic <promisic(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: "Felix Schmidt (at) Oracle" <felix(dot)x(dot)schmidt(at)oracle(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Query Optimizer + Parallel Operators
Date: 2011-01-27 07:07:34
Message-ID: AANLkTi=aKf_HVzx7TS4MHCwphCuPz+i_Qr3nEFiSBxKo@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

This is kinda scary .....

Oracle guy asking for PostgreSQL documentation and internals of the
optimizer.

On Thu, Jan 27, 2011 at 12:14 AM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> Felix,
>
> > I'm interested in the query optimizer of PostgreSQL DB. Where could I
> > find useful documentation or could you send me a pointer in the source
> code?
> >
> > What kind of parallelism does PostgreSQL use for operators, like
> > selection or join?
>
> Normally we're very helpful with this kind of information ... it's all
> public after all ... but I have to say that the domain you're e-mailing
> from makes it a little hard to give you a direct answer.
>
> Could you maybe give us a little information about what you want this
> information for?
>
> --
> -- Josh Berkus
> PostgreSQL Experts Inc.
> http://www.pgexperts.com
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: "Felix Schmidt (at) Oracle" <felix(dot)x(dot)schmidt(at)oracle(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Query Optimizer + Parallel Operators
Date: 2011-01-27 10:38:52
Message-ID: 4D414B3C.7020603@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 26.01.2011 16:46, Felix Schmidt @ Oracle wrote:
> Everybody,
>
> I'm interested in the query optimizer of PostgreSQL DB. Where could I
> find useful documentation or could you send me a pointer in the source code?

The relevant source code is in src/backend/optimizer directory. If you
google around, you'll find introductory presentations, but I can't
recommend any particular one.

> What kind of parallelism does PostgreSQL use for operators, like
> selection or join?

The short answer is "none". Each PostgreSQL backend is a one
single-threaded process, one query will only utilize one CPU
(http://wiki.postgresql.org/wiki/FAQ#How_does_PostgreSQL_use_CPU_resources.3F).

If you search the archives, you'll find discussion on how it might one
day be improved, but nothing concrete has been done.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com