SQL Server Performance

simulate the disconnected data without actually lo

Discussion in 'SQL Server 2005 General Developer Questions' started by sunhcl, Jan 9, 2007.

  1. sunhcl New Member

    Hi ,

    There is a table with the following structure

    Date-Time of Operation | Message | details | Reason | Username | IP | MAC-Address

    A user can fire query based on some condition on columns. By default the data returned is sorted on date

    Suppose user get 1000 rows. Now if the suppose user change the sort column in the UI to MAC Address.

    Thus there are two ways
    1. Keeping all data in memory - Problem --- if the result set returned is big.
    2. Again fire the query - Problem --- if some new rows are added i will get new data.

    So what should i do simulate the disconnected data without actually loading all rows in the memory.

  2. MohammedU New Member

    Based on your conditions...Only I can think of creating new global temp table for each user connection and query the data off of temp table if user want to sort in different way...

    Note: global temp table name should be dynically generated and should be stored in a variable...

    Mohammed U.
  3. HankS New Member

    You mention 1000 rows. Will the user be retrieving more than that? 1000 rows of the structure you defined is not very big. I would use disconnected data and sort at the client, unless they'll be retrieving a lot more than 1000 rows.


Share This Page