From: Laurenz Albe <laurenz.albe@cybertec.at>
To: wambacher@posteo.de
To: pgsql-admin@lists.postgresql.org
Subject: Re: finding queries doing sequential search
Date: Sat, 15 Dec 2018 14:55:07 +0100
Message-ID: <a63c0b4ae8eae198ad9554b020d89f458225c600.camel@cybertec.at> (raw)
In-Reply-To: <6dd2fe53-a93d-a2ca-05aa-325921333dac@posteo.de>
References: <6dd2fe53-a93d-a2ca-05aa-325921333dac@posteo.de>
wambacher@posteo.de wrote:
> i have a very big table (PostGIS OpenStreetMap data, but that does not mapper)
> with about 380 million records and a size of 275 GB + Indices.
> Permanently updated and growing.
> Of course i enabled autovacuum.
> 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.
> Is there a way/trick do this?
With a big table it shouldn't be a problem.
Set log_min_duration_statement = 10000 or similar, and all long running
statements will be logged. The sequential scans should be among them.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, wambacher@posteo.de
Subject: Re: finding queries doing sequential search
In-Reply-To: <a63c0b4ae8eae198ad9554b020d89f458225c600.camel@cybertec.at>
References: <6dd2fe53-a93d-a2ca-05aa-325921333dac@posteo.de> <a63c0b4ae8eae198ad9554b020d89f458225c600.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox