On Tue, Mar 29, 2011 at 09:50:05PM +0300, Ibrahim Harrani wrote:
> 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
> 
Yes, once the CLUSTER index has been defined by a use, only a
"CLUSTER table;" is needed. You should only need to cluster to
maintain I/O performance. HOT should keep the table in good
shape longer, but over time the amount of random I/O will increase
and that is when you need to cluster. If you trend the I/O of your
disks, it should be obvious when a cluster is needed.

Cheers,
Ken

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Dspam-user mailing list
Dspam-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-user

Reply via email to