Re: [HACKERS] Performance testing of COPY (SELECT) TO

From: Zoltan Boszormenyi <zboszor(at)dunaweb(dot)hu>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Performance testing of COPY (SELECT) TO
Date: 2006-08-28 15:33:23
Message-ID: 44F30CC3.2010002@dunaweb.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan írta:
> Alvaro Herrera wrote:
>> Böszörményi Zoltán wrote:
>>
>>> Hi,
>>>
>>> what's the problem with COPY view TO, other than you don't like it? :-)
>>>
>>
>> The problem is that it required a ugly piece of code. Not supporting it
>> means we can keep the code nice. The previous discussion led to this
>> conclusion anyway so I don't know why we are debating it again.
>>
>>
>
> What is so ugly about it? I haven't looked at the code, but I am
> curious to know.
>
> I also don't recall the consensus being quite so clear cut. I guess
> there is a case for saying that if it's not allowed then you know that
> "COPY relname TO" is going to be fast. But, code aesthetics aside, the
> reasons for disallowing it seem a bit thin, to me.
>
> cheers
>
> andrew
>

I would say the timing difference between
"COPY table TO" and "COPY (SELECT * FROM table) TO"
was noise, so it's not even faster.

And an updatable VIEW *may* allow COPY view FROM...

Best regards,
Zoltán Böszörményi

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2006-08-28 15:46:08 Good news on CPU scaling for latest 8.2
Previous Message Andrew Dunstan 2006-08-28 15:07:40 Re: [PATCHES] Another VPATH patch for ecpg

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2006-08-28 15:54:16 Re: [HACKERS] Performance testing of COPY (SELECT) TO
Previous Message Andrew Dunstan 2006-08-28 15:07:40 Re: [PATCHES] Another VPATH patch for ecpg