Re: Want to use my own query-plan

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: dakotali kasap <dakotalidavid(at)yahoo(dot)com>
Cc: Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Want to use my own query-plan
Date: 2006-10-21 21:36:34
Message-ID: 20061021213634.GB27685@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

dakotali kasap wrote:

> 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).

You can't force the system to use a particular join method, but you can
select which one is inner and which one is outer -- you just need to set
join_collapse_limit to 1, and write the query in the specific order you
want. See

http://momjian.us/main/writings/pgsql/sgml/runtime-config-query.html#RUNTIME-CONFIG-QUERY-OTHER

and

http://momjian.us/main/writings/pgsql/sgml/explicit-joins.html

(sorry, pointers to development-version docs).

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2006-10-21 22:42:21 FW: [pgadmin-hackers] FW: adminpack and pg_catalog
Previous Message Tom Lane 2006-10-21 21:33:45 Re: Updates for vcbuild