|
Posted by Erland Sommarskog on 10/01/00 11:32
[posted and mailed, please reply in news]
vibha vyas (vyas.vibha@gmail.com) writes:
> We have a very huge database its around 6 lakh records
> are being stored in it.
> records are not being a sorted order so we checked all
> record field through clustering option in Sql server.when we used
> clustering records are showing in sorted order but speed of database is
> very slow .
If records are not displayed in the order you want, you need to use
an ORDER BY clause in your queries. That's the only way.
> i want to know with clustering is there any implecation in database
> regading performance od data.Can any one give his views to solve this
> problem?and increase the performance of our database.
It's usually considered best practice to have a clustered index on a
table. What you should put clustered index on is a more delicate matter.
For INSERT-itensive tables, the clusrered index may be chosen to
keep fragmentation in check. But normally, the clustered index is picked
to accomdate a common queries. An Orders table for instance is likely
to have its clustered index on OrderDate or CustomerID.
Generally, the clustered index should not be too long as it also appears
as row locator in non-clustered indexes.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|