Slow Query, many tmpfiles - Mailing list pgsql-general

From basti
Subject Slow Query, many tmpfiles
Date
Msg-id f5317b9b-8421-7c39-8a3e-d9371a05f326@unix-solution.de
Whole thread Raw
Responses Re: Slow Query, many tmpfiles
List pgsql-general
Hello, some simple query are very slow since a few days, no significant
changes are done the last days. I look for disk-io, swap, looked tables,
all seems to be good.

What I have found is this:

postgres=# SELECT temp_files AS "Temporary files"
     , temp_bytes AS "Size of temporary files"
FROM   pg_stat_database db;
 Temporary files | Size of temporary files
-----------------+-------------------------
               0 |                       0
               0 |                       0
               0 |                       0
               0 |                       0
           13542 |           5313912899891
(5 rows)

postgres@dolly:~/9.6/main/base/pgsql_tmp$ ls -la
total 20
drwx------ 2 postgres postgres 16384 Feb  3 02:25 .
drwx------ 8 postgres postgres  4096 Jul 26  2017 ..

Where does the 13542 tmp files are come from?
How can I delete that?
Where are they stored?



pgsql-general by date:

Previous
From: Andrei Zhidenkov
Date:
Subject: Re: How to avoid UPDATE on same data in table ?
Next
From: Steven Lembark
Date:
Subject: Re: performance of loading CSV data with COPY is 50 times fasterthan Perl::DBI