Re: Re: What's faster? BEGIN ... EXCEPTION or CREATE TEMP TABLE IF NOT EXISTS?

From: Ivan Voras <ivoras(at)freebsd(dot)org>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Moshe Jacobson <moshe(at)neadwerx(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Re: What's faster? BEGIN ... EXCEPTION or CREATE TEMP TABLE IF NOT EXISTS?
Date: 2012-10-05 15:13:33
Message-ID: CAF-QHFVcqBAhDiwHr6QY6UtnzLvd+dVyexUmXcpB5x0_-4gjkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5 October 2012 15:55, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> On Fri, Oct 5, 2012 at 3:09 AM, Ivan Voras <ivoras(at)freebsd(dot)org> wrote:
>> I think I can make a fairly educated guess that catching exceptions
>> while dealing with session variables should be much, much faster than
>> creating any kind of a table :)

> On the other hand, if the temp table can be completely ditched for a
> session variable or two, then yeah, that would be much better since
> you'd avoid the overhead of creating the table completely.

Yes, this is what I was aiming at, based on the OP mentioning he only
has a limited amount of data to manage in this way.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Christensen 2012-10-05 15:17:52 Re: Counting all results before LIMIT
Previous Message P Gouv 2012-10-05 15:02:55 Re: Counting all results before LIMIT