Re: [Dspam-user] slow process time with pgsql backend
Brought to you by:
paulcockings,
sbajic
From: Ibrahim H. <ibr...@gm...> - 2011-03-29 18:50:12
|
Hi dspam=# ALTER TABLE dspam_token_data SET ( FILLFACTOR = 90 ); ALTER TABLE dspam=# CLUSTER dspam_token_data USING dspam_token_data_uid_key; ERROR: index "dspam_token_data_uid_key" for table "dspam_token_data" does not exist dspam=# \d dspam_token_data Table "public.dspam_token_data" Column | Type | Modifiers ---------------+---------+----------- uid | integer | token | bigint | spam_hits | integer | innocent_hits | integer | last_hit | date | Indexes: "dspam_token_data_uid_token_key" UNIQUE, btree (uid, token) dspam=# CLUSTER dspam_token_data USING dspam_token_data_uid_token_key; CLUSTER dspam=# I think CLUSTER dspam_token_data; enough for the further clustering? How often should I run CLUSTER? Thanks On Tue, Mar 29, 2011 at 9:29 PM, Kenneth Marshall <kt...@ri...> wrote: > On Tue, Mar 29, 2011 at 08:27:25PM +0300, Ibrahim Harrani wrote: >> >> > How did you change the fillfactor? You would need to do an alter >> > table followed by a cluster to rewrite the table and include the >> > freespace required by the fillfactor. Is that how you performed >> > that operation. You could also do a full copy to a new table with >> > the correct fillfactor. >> >> I simply issued >> ALTER TABLE dspam_token_data SET ( FILLFACTOR = 90 ); >> But I did not make a fully copy on the table. >> Can you give me an example how to issue cluster on the table? >> > > CLUSTER dspam_token_data USING dspam_token_data_uid_key; > > This command will rewrite the table with the correct fill-factor > and allow HOT updates to work. > > Cheers, > Ken > |