Re: finding queries doing sequential search

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wambacher(at)posteo(dot)de
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: finding queries doing sequential search
Date: 2018-12-14 15:59:53
Message-ID: 11933.1544803193@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

wambacher(at)posteo(dot)de writes:
> The log shows me 8.2 Mio index scans (iscan), which is fine,  and right
> now 424 sequential scans (sscan) for planet_osm_polygon. see attached image.
> I want to locate the query doing this stuff but EXPLAIN won't help
> because most querys are dynamicly created.

auto_explain might help. Or you could just log_min_duration_statement
to capture queries that are running long.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Phil Frost 2018-12-14 17:39:13 Re: finding queries doing sequential search
Previous Message wambacher 2018-12-14 15:39:30 finding queries doing sequential search