Re: execute same query only one time?

From: Harald Fuchs <hari(dot)fuchs(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: execute same query only one time?
Date: 2016-02-09 09:35:43
Message-ID: 877fie6xao.fsf@hf.protecting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Johannes <jotpe(at)posteo(dot)de> writes:

>> What the reason to execute all statements which return different
>> columns at once?
>>
>>> Saving roundtrips,
>>
>> In most cases they are not so big. Getting a bunch of duplicated data
>> is wasting you network bandwidth and don't increase speed.
>
> In my and your example no duplicated data (result sets) is send over the
> network. The server do not need to wait until the client snips out the
> id and sends it id in the next query again. So the server can compute
> the result set without external dependencies as fast as possible.

Sounds like what you're really after is a stored procedure, isn't it?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Алексей Митропольский 2016-02-09 10:44:41 no pg_hba.conf entry for replication connection
Previous Message subhan alimy 2016-02-09 06:57:40 Postgresql Server Upgarde