I am sorry for not elaborating on that. What I meant by de-correlation was
optimizing a query to get rid of sub-queirs by using joins.

eg. In the TPC-H schema, a query to find out the names of suppliers who
supply parts having size  < 100

*Query with nested subqueries:*

SELECT
    S_NAME
FROM
    SUPPLIER
WHERE
    S_SUPPKEY
    IN (
        SELECT
            PS_SUPPKEY
        FROM
            PARTSUPP
        WHERE
            PS_PARTKEY
                IN (
                    SELECT
                        P_PARTKEY
                    FROM
                        PART
                    WHERE
                        P_SIZE < 100
                )



*Query with joins without subqueries:*


SELECT
    S_NAME
FROM
    SUPPLIER
INNER JOIN
    PARTSUPP
ON
    S_SUPPKEY = PS_SUPPKEY
INNER JOIN
    PART
ON
    P_PARTKEY = PS_PARTKEY
WHERE
    P_SIZE < 100



Thanks,
Mahendra



On Thu, Jul 23, 2009 at 9:02 PM, Itagaki Takahiro <
itagaki.takah...@oss.ntt.co.jp> wrote:

>
> mahendra chavan <mah...@gmail.com> wrote:
>
> > I am a master's student in computer science at IIT Bombay. As part of my
> > project, I need to get a decorrelated version of a SQL query.  Please
> could
> > anyone let me know if we have query decorrelation feature implemented in
> > postgres ?
>
> What do you mean by "query decorrelation"? Is it an addtional method for
> query optimization? At least there is no word 'decorrelation' in
> the postgres documentation.
>
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center
>
>
>

Reply via email to