Clustered and Non-clustered Index

Discussion in 'Database' started by plugsharma, Dec 17, 2008.

  1. plugsharma

    plugsharma New Member

    Joined:
    Nov 25, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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.


    Please help..


    Thanks

    Sharma
     

    Attached Files:

  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Moved to database forums for better response.
     
  3. plugsharma

    plugsharma New Member

    Joined:
    Nov 25, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice