Re: Want to use my own query-plan - Mailing list pgsql-hackers

From dakotali kasap
Subject Re: Want to use my own query-plan
Date
Msg-id 20061021095007.51222.qmail@web31312.mail.mud.yahoo.com
Whole thread Raw
In response to Want to use my own query-plan  (dakotali kasap <dakotalidavid@yahoo.com>)
Responses Re: Want to use my own query-plan
List 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 by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: xlogdump fixups and WAL log question.
Next
From: Martijn van Oosterhout
Date:
Subject: Re: xlogdump fixups and WAL log question.