Re: execute same query only one time?
От | Vitaly Burovoy |
---|---|
Тема | Re: execute same query only one time? |
Дата | |
Msg-id | CAKOSWNmF4EWJY1V909iXfp7_Q-LRPYi2AAMkJGxPuQC+pKbGhg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: execute same query only one time? (Harald Fuchs <hari.fuchs@gmail.com>) |
Ответы |
Re: execute same query only one time?
|
Список | pgsql-general |
On 2/9/16, Harald Fuchs <hari.fuchs@gmail.com> wrote: > Johannes <jotpe@posteo.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? Unfortunately, his case is different, because he needs to get two different set of rows that is impossible even with stored procedures. -- Best regards, Vitaly Burovoy
В списке pgsql-general по дате отправления: