Re: BUG #13979: Strange pg_stat_statements results with PREPARE/EXECUTE

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #13979: Strange pg_stat_statements results with PREPARE/EXECUTE
Дата
Msg-id CAKFQuwbqc=L3LfH-aNBCyipjg3hjWe6nSBaLwBCr-abMSxxtCQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13979: Strange pg_stat_statements results with PREPARE/EXECUTE  (Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>)
Ответы Re: BUG #13979: Strange pg_stat_statements results with PREPARE/EXECUTE
Список pgsql-bugs
On Tue, Feb 23, 2016 at 8:24 AM, Kasahara Tatsuhito <
kasahara.tatsuhito@gmail.com> wrote:

> 2016-02-23 23:36 GMT+09:00 David G. Johnston <david.g.johnston@gmail.com>=
:
> > You need to tell people what exactly you think is strange/what you woul=
d
> > expect to see.
> Yeah.
>
> So I expected following result after performing second time "SELECT *
> FROM tt WHERE c1 =3D $1" in a  previous e-mail.
>
> =3D# SELECT queryid, calls, query FROM pg_stat_statements WHERE query LIK=
E
> '%tt%';
>   queryid  | calls |                       query
> -----------+-------+----------------------------------------------------
>  575935600 |    1| PREPARE p1(int) AS SELECT * FROM tt WHERE c1 =3D $1;
>  other-queryid |    10 | SELECT * FROM tt WHERE c1 =3D $1;
> (2 row)
>
> But actually SELECT was counted  as PREPARE in pg_stat_statements.
> That's what I thought strange.
>
> It seems to me that "<query>" and "PREPARE <query>" always have same
> queryid.
> Therefore should I consider these queries as the same one ?
>
>
=E2=80=8BWhat do you think the following statement does?

=E2=80=8B
PreparedStatement ps1 =3D con.prepareStatement(sql1);

=E2=80=8BDavid J.
=E2=80=8B

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Kasahara Tatsuhito
Дата:
Сообщение: Re: BUG #13979: Strange pg_stat_statements results with PREPARE/EXECUTE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13979: Strange pg_stat_statements results with PREPARE/EXECUTE