Re: Want to use my own query-plan

Поиск
Список
Период
Сортировка
От dakotali kasap
Тема Re: Want to use my own query-plan
Дата
Msg-id 20061021095007.51222.qmail@web31312.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Want to use my own query-plan  (dakotali kasap <dakotalidavid@yahoo.com>)
Ответы Re: Want to use my own query-plan  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Actually, the system that we want to build up will keep incomplete information with a decomposition based approach. So a normal relation R will be represented on 3 different relations (T:template, C: components, W:worlds). According to this representation a normal selection with constant on R will be rewritten into a group of SQL statements such that we will get new (T,C,W) triples. At this point, PostgreSQL cannot know what we are doing and the structure of the decomposed relations (I mean doing a merge-join at one step is always the most efficient...). Therefore, I want to say the join-method that will be used or which relation will be outer which one will be inner. (I cannot do this just using SELECT * FROM a JOIN b).

Baran

----- Original Message ----
From: Neil Conway <neilc@samurai.com>
To: dakotali kasap <dakotalidavid@yahoo.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Sent: Saturday, October 21, 2006 3:10:52 AM
Subject: Re: [HACKERS] Want to use my own query-plan

On Fri, 2006-10-20 at 16:05 -0700, dakotali kasap wrote:
> 1. How can I prepare my own query plan?

You can't: there is currently no public API for constructing plans by
hand. You could kludge something up by hand, but it would be pretty
fragile (internal planner data structures may well change between
releases).

> 2. How can I make postgresql execute my own query plan?

Once you have a valid Plan, you can just feed it to the executor as
normal (CreateQueryDesc(), ExecutorStart(), ExecutorRun(),
ExecutorEnd(), etc.)

-Neil




---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: xlogdump fixups and WAL log question.
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: xlogdump fixups and WAL log question.