Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
| Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 17th, 2008, 10:21 AM
Registered User
 
Join Date: Nov 2008
Location: Chennai, TN, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Clustered and Non-clustered Index

Hi,

I have one table having more than 3 millions rows with following columns:

[SITE_ID]

[USER_NAME]

[ACTIVITY_NAME]

[PAGE_TYPE]

[ACTION]

[DOC_ID]

[FROM_PAGE]

[TO_PAGE]

[ORG_NAME]

[LOG_DATE_TIME]

[SESSION_ID]

[IP]

[MACHINE_ID]



I am using 8 different queries, all thru stored procedure, to fetch data.

SITE_ID, USER_NAME, ORG_NAME and ACTION are in all queries WHERE clause.

I have created SITE_ID as non-unique clustered index and USER_NAME, ORG_NAME and ACTION as non-unique non-clustered index.

Problem is that data fetching without indexs is faster than when creating idex.

Is there any problem in index columns.

Can you please suggest me a better index plan.

I have attached the queries / column table image file.

http://xs434.xs.to/xs434/08513/queries-columns997.jpg

Images file described columns called details
<br /><img src='http://xs434.xs.to/xs434/08513/queries-columns997.jpg'><br>
(http://xs434.xs.to/xs434/08513/queries-columns997.jpg or
http://xs.to/xs.php?h=xs434&d=08513&...columns997.jpg)


Please help..


Thanks

Sharma


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clustered Index Scan bmains SQL Server 2000 5 June 7th, 2010 11:35 AM
Page splits - Clustered vs Non-Clustered Index carumuga SQL Server 2005 3 October 20th, 2008 04:23 AM
Clustered PK Constr fails to create on big table kapluni SQL Server 2000 5 November 23rd, 2005 06:27 PM
Question about clustered indexes patwadd SQL Server 2000 1 July 15th, 2005 05:01 AM
Size of Clustered Index MikeSchnell SQL Server 2000 0 May 7th, 2004 02:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.