Slow inserts/deletes
Slow inserts/deletes
От:
"Diehl, Jeffrey" <jdiehl@sandia.gov>
Дата:
Hi again, I've got another database that I maintain which is suffering from extremely slow record inserts or deletes. The table has about 30K records in it. It has to simple indexes on it. When I create the table from scratch and do all 30K inserts, it goes pretty fast. When I then go back and do either an update-where, or a delete-where/insert, it takes SEVERAL seconds! I thought that maybe something had the table locked, so I rebooted the server and started postgres manually; this didn't help the problem. I need to get some ideas as to where to look. Thanx, Mike Diehl, Network Monitoring Tool Devl. 284-3137 jdiehl@sandia.gov
Re: Slow inserts/deletes
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Diehl, Jeffrey" writes:
> I've got another database that I maintain which is suffering from extremely
> slow record inserts or deletes.
Can't give you any help on the basis of the info you provided. How
about telling us: the PG version in question, the schema(s) of the
table(s) used ("pg_dump -s -t tabname dbname" is the best way here),
the exact queries you're having trouble with, and the output of
EXPLAIN for those queries.
regards, tom lane
Re: Slow inserts/deletes
От:
"Frank Contrepois" <sokak@tin.it>
Дата:
If you use index on this table it's better to: 1) drop all index on the table 2) do the insert 3) (re)create the indexes -- -- "L'idea di base � estremamente semplice..." �opyright Frank "Pazzooo" Contrepois (schiavista francese del '900)