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