| From: | Edson Richter <edsonrichter(at)hotmail(dot)com> |
|---|---|
| To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
| Cc: | "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org> |
| Subject: | RES: Log number of tuples returned |
| Date: | 2021-04-29 15:31:04 |
| Message-ID: | CP2P152MB040378CFBE805175DE8D4106CF5F9@CP2P152MB0403.LAMP152.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
De: Justin Pryzby<mailto:pryzby(at)telsasoft(dot)com>
Enviado:quinta-feira, 29 de abril de 2021 12:08
Para: Edson Richter<mailto:edsonrichter(at)hotmail(dot)com>
Cc:pgsql-performance(at)lists(dot)postgresql(dot)org<mailto:pgsql-performance(at)lists(dot)postgresql(dot)org>
Assunto: Re: Log number of tuples returned
On Thu, Apr 29, 2021 at 03:01:29PM +0000, Edson Richter wrote:
> Which postgresql logging parameters should I activate to log the “number of tuples returned” for a query?
> I would like to debug some dynamicly generated queries in the system that are returning a absurd number of tuples (> 2,6mi of records).
You can load the auto_explain extension and set:
auto_explain.log_analyze
And then the "rows" are logged:
Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.004 rows=1 loops=1)
https://www.postgresql.org/docs/current/auto-explain.html
--
Justin
Perfect, Thanks!
ER.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | aditya desai | 2021-04-30 13:02:44 | Re: Error while calling proc with table type from Application (npgsql) |
| Previous Message | Justin Pryzby | 2021-04-29 15:08:26 | Re: Log number of tuples returned |