|
Posted by Erland Sommarskog on 02/14/07 22:44
Russell Wallace (russell.no.spam@gmail.com) writes:
> Suppose a database server and client are separated by a low bandwidth
> link such as DSL, and the client repeatedly issues a query for, say, a
> current product list.
>
> Suppose the product list is large, but only a handful of entries have
> typically changed between queries. It would be nice if only the changes
> from last query to current one could be sent, saving bandwidth.
>
> Is there any way to do this?
You would need to add a column to track changes. One way to do this is
to use a timestamp column. A timestamp column is automatically updated
when a row is touched with a database-unique 8-byte value that grows
monotonically. Thus, you can save the highest timestamp value client-
side, and then send this as a parameter the next time.
Note that this scheme as I descibed it, is not suitable for tables with
a high transaction-rate, as you may fail to read some updates.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|