Re: there is a great difference between the query execution time and the log record time

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: "dbyzaa(at)163(dot)com" <dbyzaa(at)163(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: there is a great difference between the query execution time and the log record time
Date: 2018-02-08 16:44:47
Message-ID: CA+bJJbxuFFMsiuhEYW9HjwD6Ei7+r=xVn2afBoJA2ykwqt1atw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 8, 2018 at 5:35 PM, dbyzaa(at)163(dot)com <dbyzaa(at)163(dot)com> wrote:
> Hi,everybody recently, I found some slow SQL runtime as long as 4 seconds in
> postgres log. However, when I was executing on PSQL client, it takes only
> 3.6 milliseconds, I did the following things.
....

You are not doing the same thing ( explain discards all data in the
server ) and your query has a lot of columns. I'm not sure if it does
affect, but are you sure you are not gettin more time for transmitting
the actual result data?

Francisco Olarte.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message nemo 2018-02-08 16:50:45 Re: there is a great difference between the query execution time and the log record time
Previous Message Adrian Klaver 2018-02-08 16:43:46 Re: there is a great difference between the query execution time and the log record time