ow wrote:
> Hi,
> 
> I tried CLUSTER and it did improve performance, somewhat. The query against
> "clustered" table performs about five (5) times better than the same table but
> "non-clustered". However, even after that table was clustered, the difference
> in performance between single record query and range query is significant:
> 
> table Test (see below) has 10M records
>   single record - 31 ms and remains mostly constant as table grows
>   range query returning 30 records - about 10 secs and grows together with the
> table
> 
> Also, CLUSTER is locking the table (in our case this also means locking the
> database), so it may be impossible to use it in production on large tables
> (impossible in our case).
> 
> It feels like I really have a problem here. Any ideas? Thanks
> 
> P.S. For the future I would consider implementing "CREATE [CLUSTERED] INDEX"

Strange 30 records takes 30x the time than one record.  Can you run
ANALYZE and send us an EXPLAIN of the query to make sure it hasn't
changed?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to