pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedshort query becomes long
2+ messages / 2 participants
[nested] [flat]
* short query becomes long
@ 2000-06-01 18:24 mikeo <mikeo@spectrumtelecorp.com>
2000-06-02 02:31 ` Re: short query becomes long Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: mikeo @ 2000-06-01 18:24 UTC (permalink / raw)
To: pgsql-sql
hi,
we have a weird situation here. we have a table of approx. 10k rows
representing accumulated activity by specific customers. as information
is gathered those customers rows are updated. the number of rows does not
increase unless we get a new customer so that is not a factor. the table
is defined as follows:
Table "account_summary_02"
Attribute | Type | Modifier
-------------+-------------+----------
bill_br_id | bigint | not null
cust_id | varchar(15) | not null
btn_id | varchar(15) | not null
ln_id | varchar(15) | not null
ct_key | float8 | not null
as_quantity | float8 | not null
as_charges | float8 | not null
as_count | float8 | not null
Index: account_summary_02_unq_idx
the index is on the first 5 columns. here's the situation. after about
50,000
updates, which fly right along, the process begins to really bog down. we
perform
a vacuum analzye and it speeds right up again. my question is, is there a way
to perform these updates, potentially 500k to 1 million in a day, without
having
to vacuum so frequently? maybe some setting or parameter to be changed?
the update
query is doing an index scan.
mikeo
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: short query becomes long
2000-06-01 18:24 short query becomes long mikeo <mikeo@spectrumtelecorp.com>
@ 2000-06-02 02:31 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2000-06-02 02:31 UTC (permalink / raw)
To: mikeo <mikeo@spectrumtelecorp.com>; +Cc: pgsql-sql
mikeo <mikeo@spectrumtelecorp.com> writes:
> after about 50,000 updates, which fly right along, the process begins
> to really bog down. we perform a vacuum analzye and it speeds right
> up again.
A plain "vacuum" should do the job in a bit less time. The problem
is you need to reclaim the space occupied by deleted versions of rows.
No way around that with the current storage manager: vacuum is the
only way to get rid of the wasted space.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-06-02 02:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-06-01 18:24 short query becomes long mikeo <mikeo@spectrumtelecorp.com>
2000-06-02 02:31 ` Tom Lane <tgl@sss.pgh.pa.us>
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