Re: Want to use my own query-plan

From: dakotali kasap <dakotalidavid(at)yahoo(dot)com>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Want to use my own query-plan
Date: 2006-10-21 09:50:07
Message-ID: 20061021095007.51222.qmail@web31312.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)samurai(dot)com>
To: dakotali kasap <dakotalidavid(at)yahoo(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-10-21 10:08:41 Re: xlogdump fixups and WAL log question.
Previous Message Simon Riggs 2006-10-21 09:37:51 Re: xlogdump fixups and WAL log question.