Re: Benchmarking partitioning triggers and rules

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: 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 02:49:37
Message-ID: CAGuHJrPZjjZSuc_TbH+rymax2AdDq3XgSjX8FW_-0ZGhTpszrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 ;

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-04-08 04:08:50 Re: Benchmarking partitioning triggers and rules
Previous Message Chris Winslett 2015-04-08 00:46:21 Re: Asynchronous replication in postgresql