Re: Get more from indices. - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Get more from indices.
Date
Msg-id 01d501cf0b7c$816d06d0$84471470$@etsuro@lab.ntt.co.jp
Whole thread Raw
In response to Re: Get more from indices.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Kyotaro HORIGUCHI wrote:
> tgl> The problem is that joining isn't the only way that such expansion
> tgl> can happen.  Set-returning functions in the targetlist are another
> tgl> way, and I'm not sure that there aren't others.  Here's an example
> tgl> that I'm pretty sure breaks your patch (though I didn't actually
> tgl> reinstall the patch to try it):

> tgl> Also, even if the row-expansion mechanism is a join, it's certainly
> tgl> insufficient to check that the lower-order sort column is an
> tgl> expression in variables of the index's table.  Something like "f2 +
> tgl> random()" is going to need an explicit sort step anyway.

> tgl> These particular objections could be worked around by checking for
> tgl> set-returning functions and volatile functions in the lower-order
> tgl> ORDER BY expressions.  But I have to say that I think I'm losing
> tgl> faith in the entire idea.  I have little confidence that there
> tgl> aren't other cases that will break it.

> On the other hand, the precondition should be satisfied when all extended
> columns are simple Vars of the target table. I believe Vars cannot produce
> multiple result. More close checking for every possibility could be done
> but it should be a overdone.

> The following modification to v7 does this.

It seems to me that this would be reasonable at least as the first step and
that it would be better to leave more close checking for future work.

Thanks,

Best regards,
Etsuro Fujita




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Long paths for tablespace leads to uninterruptible hang in Windows
Next
From: Michael Paquier
Date:
Subject: Re: [bug fix] "pg_ctl stop" times out when it should respond quickly