Re: [HACKERS] Patch for removng unused targets

2013-08-04 Thread Etsuro Fujita
From: Tom Lane [mailto:t...@sss.pgh.pa.us] Having said all that, there is one situation where this type of approach might still be useful even after such a fix, and that's KNNGist-style queries: select a,b,c from t order by col - constant limit 10; In a KNNGist search, there's

Re: [HACKERS] Patch for removng unused targets

2013-08-02 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Thank you for the adjustments and comments! In addition to adding comments to the function, I've improved the code in the function a little bit. Please find attached an updated version of the patch. I started looking at this patch

Re: [HACKERS] Patch for removng unused targets

2013-08-02 Thread Josh Berkus
Reading between the lines of the original submission at CAPpHfdtG5qoHoD+w=Tz3wC3fZ=b8i21=V5xandBFM=DTo-Yg=q...@mail.gmail.com, I gather that it's the KNNGist-style case that worries you, so maybe it's worth applying this type of patch anyway. I'd want to rejigger it to be aware of the cost

Re: [HACKERS] Patch for removng unused targets

2013-08-02 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Reading between the lines of the original submission at CAPpHfdtG5qoHoD+w=Tz3wC3fZ=b8i21=V5xandBFM=DTo-Yg=q...@mail.gmail.com, I gather that it's the KNNGist-style case that worries you, so maybe it's worth applying this type of patch anyway. I'd want to

Re: [HACKERS] Patch for removng unused targets

2013-08-02 Thread Josh Berkus
On 08/02/2013 03:45 PM, Tom Lane wrote: So, Returned With Feedback, or move it to September? The patch is certainly not getting committed as-is (at least not by me), so it would likely be fair to mark it RWF so we can close the commitfest. I'll still work on a revised version after the fest

Re: [HACKERS] Patch for removng unused targets -- PLEASE COMMIT

2013-07-31 Thread Josh Berkus
On 07/29/2013 03:23 PM, Josh Berkus wrote: Everyone, This patch has been marked ready for committer since July 2nd. Can someone please commit it, and let us close out this CF? Hello? Hello? Is there a committer in the house? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com

Re: [HACKERS] Patch for removng unused targets -- PLEASE COMMIT

2013-07-31 Thread Alvaro Herrera
Josh Berkus escribió: On 07/29/2013 03:23 PM, Josh Berkus wrote: Everyone, This patch has been marked ready for committer since July 2nd. Can someone please commit it, and let us close out this CF? Hello? Hello? Is there a committer in the house? Uhm, I had written a reply but I

Re: [HACKERS] Patch for removng unused targets -- PLEASE COMMIT

2013-07-31 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Josh Berkus escribió: Hello? Hello? Is there a committer in the house? Uhm, I had written a reply but I think it was lost in the shuffle. I said that ready for committer doesn't mean that the patch is ready to commit, it means that a

Re: [HACKERS] Patch for removng unused targets -- PLEASE COMMIT

2013-07-29 Thread Josh Berkus
Everyone, This patch has been marked ready for committer since July 2nd. Can someone please commit it, and let us close out this CF? Thanks! -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] Patch for removng unused targets

2013-07-02 Thread Etsuro Fujita
From: Alvaro Herrera [mailto:alvhe...@2ndquadrant.com] Etsuro Fujita escribió: From: Hitoshi Harada [mailto:umi.tan...@gmail.com] I tried several ways but I couldn't find big problems. Small typo: s/rejunk/resjunk/ Thank you for the review. Attached is an updated version of the

Re: [HACKERS] Patch for removng unused targets

2013-06-24 Thread Alvaro Herrera
Etsuro Fujita escribió: From: Hitoshi Harada [mailto:umi.tan...@gmail.com] I tried several ways but I couldn't find big problems. Small typo: s/rejunk/resjunk/ Thank you for the review. Attached is an updated version of the patch. Thanks. I gave this a look, and made it some trivial

Re: [HACKERS] Patch for removng unused targets

2013-06-21 Thread Hitoshi Harada
On Thu, Jun 20, 2013 at 12:19 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote: From: Hitoshi Harada [mailto:umi.tan...@gmail.com] I guess the patch works fine, but what I'm saying is it might be limited to small use cases. Another instance of this that I can think of is ORDER BY

Re: [HACKERS] Patch for removng unused targets

2013-06-21 Thread Etsuro Fujita
From: Hitoshi Harada [mailto:umi.tan...@gmail.com] I tried several ways but I couldn't find big problems. Small typo: s/rejunk/resjunk/ Thank you for the review. Attached is an updated version of the patch. Thanks, Best regards, Etsuro Fujita unused-targets-20130621.patch Description:

Re: [HACKERS] Patch for removng unused targets

2013-06-20 Thread Etsuro Fujita
From: Hitoshi Harada [mailto:umi.tan...@gmail.com] I guess the patch works fine, but what I'm saying is it might be limited to small use cases. Another instance of this that I can think of is ORDER BY clause of window specifications, which you may want to remove from the target list as

Re: [HACKERS] Patch for removng unused targets

2013-06-19 Thread Etsuro Fujita
: Wednesday, June 19, 2013 2:57 PM To: Etsuro Fujita Cc: Tom Lane; Alexander Korotkov; pgsql-hackers Subject: Re: [HACKERS] Patch for removng unused targets On Tue, Jun 18, 2013 at 5:15 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote: Hi Alexander, I wrote: From: Tom Lane [mailto:t

Re: [HACKERS] Patch for removng unused targets

2013-06-19 Thread Hitoshi Harada
On Wed, Jun 19, 2013 at 4:49 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jpwrote: Hi Harada-san, ** ** Thank you for the review. ** ** I think that the parse tree has enough information to do this optimization and that the easiest way to do it is to use the information, though I

Re: [HACKERS] Patch for removng unused targets

2013-06-18 Thread Etsuro Fujita
Hi Alexander, I wrote: From: Tom Lane [mailto:t...@sss.pgh.pa.us] resjunk means that the target is not supposed to be output by the query. Since it's there at all, it's presumably referenced by ORDER BY or GROUP BY or DISTINCT ON, but the meaning of the flag doesn't depend on that.

Re: [HACKERS] Patch for removng unused targets

2013-06-18 Thread Etsuro Fujita
Hi Alexander, I wrote: From: Tom Lane [mailto:t...@sss.pgh.pa.us] resjunk means that the target is not supposed to be output by the query. Since it's there at all, it's presumably referenced by ORDER BY or GROUP BY or DISTINCT ON, but the meaning of the flag doesn't depend on that.

Re: [HACKERS] Patch for removng unused targets

2013-06-18 Thread Alexander Korotkov
Hi Etsuro! On Tue, Jun 18, 2013 at 4:15 PM, Etsuro Fujita fujita.ets...@lab.ntt.co.jpwrote: Hi Alexander, I wrote: From: Tom Lane [mailto:t...@sss.pgh.pa.us] resjunk means that the target is not supposed to be output by the query. Since it's there at all, it's presumably

Re: [HACKERS] Patch for removng unused targets

2013-06-18 Thread Etsuro Fujita
for removng unused targets Hi Etsuro! On Tue, Jun 18, 2013 at 4:15 PM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote: Hi Alexander, I wrote: From: Tom Lane [mailto:t...@sss.pgh.pa.us] resjunk means that the target is not supposed to be output by the query. Since it's there at all

Re: [HACKERS] Patch for removng unused targets

2013-06-18 Thread Hitoshi Harada
On Tue, Jun 18, 2013 at 5:15 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jpwrote: Hi Alexander, I wrote: From: Tom Lane [mailto:t...@sss.pgh.pa.us] resjunk means that the target is not supposed to be output by the query. Since it's there at all, it's presumably referenced by

Re: [HACKERS] Patch for removng unused targets

2013-04-08 Thread Etsuro Fujita
From: Tom Lane [mailto:t...@sss.pgh.pa.us] Alexander Korotkov aekorot...@gmail.com writes: On Mon, Dec 3, 2012 at 8:31 PM, Tom Lane t...@sss.pgh.pa.us wrote: But having said that, I'm wondering (without having read the patch) why you need anything more than the existing resjunk field.

Re: [HACKERS] Patch for removng unused targets

2013-01-21 Thread Etsuro Fujita
Subject: Re: [HACKERS] Patch for removng unused targets On 12/05/2012 04:15 AM, Alexander Korotkov wrote: On Tue, Dec 4, 2012 at 11:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alexander Korotkov aekorot...@gmail.com writes: On Mon, Dec 3, 2012 at 8:31 PM, Tom Lane t...@sss.pgh.pa.us wrote

Re: [HACKERS] Patch for removng unused targets

2013-01-21 Thread Craig Ringer
On 01/22/2013 01:24 PM, Etsuro Fujita wrote: I'd like to rework on this optimization and submit a patch at the next CF. Is that okay? That sounds very sensible to me, given how busy CF2013-01 is and the remaining time before 9.3. -- Craig Ringer

Re: [HACKERS] Patch for removng unused targets

2013-01-18 Thread Craig Ringer
On 12/05/2012 04:15 AM, Alexander Korotkov wrote: On Tue, Dec 4, 2012 at 11:52 PM, Tom Lane t...@sss.pgh.pa.us mailto:t...@sss.pgh.pa.us wrote: Alexander Korotkov aekorot...@gmail.com mailto:aekorot...@gmail.com writes: On Mon, Dec 3, 2012 at 8:31 PM, Tom Lane t...@sss.pgh.pa.us

Re: [HACKERS] Patch for removng unused targets

2012-12-04 Thread Alexander Korotkov
On Mon, Dec 3, 2012 at 8:31 PM, Tom Lane t...@sss.pgh.pa.us wrote: Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Sorry for the delay. I've reviewed the patch. It was applied successfully, and it worked well for tests I did including the example you showed. I think it's worth the

Re: [HACKERS] Patch for removng unused targets

2012-12-04 Thread Tom Lane
Alexander Korotkov aekorot...@gmail.com writes: On Mon, Dec 3, 2012 at 8:31 PM, Tom Lane t...@sss.pgh.pa.us wrote: But having said that, I'm wondering (without having read the patch) why you need anything more than the existing resjunk field. Actually, I don't know all the cases when resjunk

Re: [HACKERS] Patch for removng unused targets

2012-12-04 Thread Alexander Korotkov
On Tue, Dec 4, 2012 at 11:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alexander Korotkov aekorot...@gmail.com writes: On Mon, Dec 3, 2012 at 8:31 PM, Tom Lane t...@sss.pgh.pa.us wrote: But having said that, I'm wondering (without having read the patch) why you need anything more than the

Re: [HACKERS] Patch for removng unused targets

2012-12-03 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Sorry for the delay. I've reviewed the patch. It was applied successfully, and it worked well for tests I did including the example you showed. I think it's worth the work, but I'm not sure you go about it in the right way. (I feel the

Re: [HACKERS] Patch for removng unused targets

2012-12-03 Thread Etsuro Fujita
From: Tom Lane [mailto:t...@sss.pgh.pa.us] Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Sorry for the delay. I've reviewed the patch. It was applied successfully, and it worked well for tests I did including the example you showed. I think it's worth the work, but I'm not sure you

Re: [HACKERS] Patch for removng unused targets

2012-12-02 Thread Etsuro Fujita
: Tuesday, October 02, 2012 4:46 PM To: pgsql-hackers; Tom Lane Subject: [HACKERS] Patch for removng unused targets Hi! Attached patch removes unused targets which are used only for order by when data already comes in right order. It introduces resorderbyonly flag of TargetEntry which

[HACKERS] Patch for removng unused targets

2012-10-02 Thread Alexander Korotkov
Hi! Attached patch removes unused targets which are used only for order by when data already comes in right order. It introduces resorderbyonly flag of TargetEntry which indicated that entry is used only for ORDER BY clause. If data comes in right order then such entries are removed in