dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

Clustered and Non-clustered Index - sqlserver-programming

This is a discussion on Clustered and Non-clustered Index - sqlserver-programming ; 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. ...


Home > Database Forum > Microsoft SQL Server > sqlserver-programming > Clustered and Non-clustered Index

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 12-17-2008, 10:26 AM
Database Newbie
 
Join Date: Nov 2008
Posts: 2
plugsharma is on a distinguished road
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.

Images file described columns called details




(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
Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 05:58 PM.