Re: Possible to find disk IOs for a Query?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 31, 2016 at 3:01 PM, Bobby Mozumder <bmozumder@xxxxxxxxx> 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.


Best,
Lukas

--
Lukas Fittl

Skype: lfittl
Phone: +1 415 321 0630

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux