Re: Possible to find disk IOs for a Query? - Mailing list pgsql-performance

From Lukas Fittl
Subject Re: Possible to find disk IOs for a Query?
Date
Msg-id CAP53PkzR0LtU3THCSjt-sgvDs4fMk5FLkWta7gtje6=ssdQwvA@mail.gmail.com
Whole thread Raw
In response to Possible to find disk IOs for a Query?  (Bobby Mozumder <bmozumder@gmail.com>)
List pgsql-performance
On Wed, Aug 31, 2016 at 3:01 PM, Bobby Mozumder <bmozumder@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.


Best,
Lukas

--
Lukas Fittl

Skype: lfittl
Phone: +1 415 321 0630

pgsql-performance by date:

Previous
From: Ben Chobot
Date:
Subject: Re: Possible to find disk IOs for a Query?
Next
From: Mark Kirkwood
Date:
Subject: Re: Possible to find disk IOs for a Query?