views:

38

answers:

0

I have a table where constantly records are inserted in, so I like to monitor this records in a DataGrid showing e.g. the 1000 last records inserted; but also, I want to show it like if this grid is a live view of what's happening on the table, some sort of tailing a file.

I've thought many ways to do it, for example, I could every five seconds just clear the grid and 'select' the last 1000 then put this new data to the grid. I think this would work but it is costly to the database if we reduce the time of the updates, also, if only one record have changed it is not optimal to retrieve the 999 not changed records.

Is it a better way to do this?