database purging

  • Hello all,

    This is what I m going to do exactly:

    My main table name: details

    This table includes all the details regarding the users visiting my sites.

    Now I wanted to apply stored procedure on this of table to get the details of how many first time visitors how many returning visitors and so on.

    I made all the stored procedure then I want to store the result of all this stored procedure to a different table.

    And all the above stuff I have done in a single stored procedure with cursor named maincursor.

    Is there any better way?

    I am just this stored procedure from the dotnet environment through executenonquery of the datareader.

    Exact error shown to me is:

    Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    Although I have make timeout period to 1000.

    Awaiting for reply,

    Thank you,

  • Hello,

    How can you call your store procedure ?

    Witch sql exception is returning by your application ?


    Kindest Regards,

    degrem_m
    Degremont

  • First of all, cursors are typically not a good performer.  If you can get away with not using a cursor, definitely do it.  Try to stick to set based logic (SELECT X FROM TABLE).  I would definitely look into your indexing and also the joins that you may be doing in your query.  Are you joining back to the same table?  What kind of indexes do you have on the table(s) you are querying?  If you could post a little more info, we might be able to help a little more.  But those are the two areas I hit first.  I'd also look into getting a web reporting tool like WebTrends or Nettracker or some other software.  Those packages do wonderful work at analyzing net traffic.  There are several free versions available as well.  They typically use the web logs to base their analysis from and usually have nice web interfaces. 

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply