| From: | Lukas Fittl <lukas(at)fittl(dot)com> |
|---|---|
| To: | Bobby Mozumder <bmozumder(at)gmail(dot)com> |
| Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: Possible to find disk IOs for a Query? |
| Date: | 2016-08-31 22:17:27 |
| Message-ID: | CAP53PkzR0LtU3THCSjt-sgvDs4fMk5FLkWta7gtje6=ssdQwvA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On Wed, Aug 31, 2016 at 3:01 PM, Bobby Mozumder <bmozumder(at)gmail(dot)com> wrote:
> Is it possible to find the number of disk IOs performed for a query?
> EXPLAIN ANALYZE looks like it shows number of sequential rows scanned, but
> not number of IOs.
>
> My database is on an NVMe SSD, and am trying to cut microseconds of disk
> IO per query by possibly denormalizing.
>
Maybe helpful, altough slightly different since it works on an aggregate
basis:
If you set "track_io_timing=on" in your postgresql.conf, you can use
pg_stat_statements [1] to get I/O timings (i.e. how long a certain type of
query took for I/O access).
Typically I'd use this in combination with system-level metrics, so you can
understand which queries were running at the time of a given I/O spike.
[1] https://www.postgresql.org/docs/9.5/static/pgstatstatements.html
Best,
Lukas
--
Lukas Fittl
Skype: lfittl
Phone: +1 415 321 0630
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mark Kirkwood | 2016-09-01 05:56:35 | Re: Possible to find disk IOs for a Query? |
| Previous Message | Ben Chobot | 2016-08-31 22:10:10 | Re: Possible to find disk IOs for a Query? |