m***t 发帖数: 254 | 1 I have a client that querys server every 1 hour. It stores local cache for
the stuff it downloaded from
server. The client local cache carries a timestamp, called client_time_stamp
. Everytime the client querys
the server, the server compares the client timestamp with a server timestamp
about the data the client
needs. If the data has not changed, the server timestamp will be older than
the cache_time_stamp, thus
the server will just return cache_valid, and client preserves old client_
time_stam | c*****t 发帖数: 1879 | 2 Basically, create two indices on key A and key B. For join operation,
it is not necessarily slow.
If both sets are small, brute force match would be sufficient.
In your case, the bottle neck could very well be disk seek time
vs disk read time. Actual comparison could be done rather quickly.
Also, if sets are sorted in certain manners, the comparison can be
done efficiently.
The bottomline is that, before you consider some fansy algorithms,
do some tests firsts.
stamp
timestamp
than
【在 m***t 的大作中提到】 : I have a client that querys server every 1 hour. It stores local cache for : the stuff it downloaded from : server. The client local cache carries a timestamp, called client_time_stamp : . Everytime the client querys : the server, the server compares the client timestamp with a server timestamp : about the data the client : needs. If the data has not changed, the server timestamp will be older than : the cache_time_stamp, thus : the server will just return cache_valid, and client preserves old client_ : time_stam
|
|