From: | Tim Uckun <timuckun(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Benchmarking partitioning triggers and rules |
Date: | 2015-04-08 21:58:21 |
Message-ID: | CAGuHJrMy0_dKkPVm5fuhH3-03DPxHR7g+O_mKRCCxTSp_fnuBA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
So is there a third and even faster way of doing this?
On Wed, Apr 8, 2015 at 4:08 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:
> On 04/07/2015 07:49 PM, Tim Uckun wrote:
>
>> I understand that there is overhead involved in parsing the strings and
>> such. The amount of overhead was surprising to me but that's another
>> matter. What I am really puzzled about is the difference between the
>> statements
>>
>> EXECUTE 'INSERT INTO ' || quote_ident(partition_name) || ' SELECT
>> ($1).*' USING NEW ;
>>
>> and
>>
>> EXECUTE 'INSERT INTO ' || quote_ident(partition_name) || ' VALUES
>> (($1).*)' USING NEW ;
>>
>
>
> Offhand I would say because in the first case you are doing a SELECT and
> in the second you are just doing a substitution.
>
>
>
>> They both do string interpolation but one is significantly faster than
>> the other. Is there a third and even faster way?
>>
>> I am using RDS so I can't really do stored procs in C.
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2015-04-09 03:28:07 | Re: Finding values of bind variables |
Previous Message | Vasudevan, Ramya | 2015-04-08 21:43:38 | Re: Finding values of bind variables |