Performance improvements with TIMESTAMP field???

  • Hey all,

    I'm working on a project with a small- to medium-sized(~700MB), multi-table SQL Server database. One of my co-workers recommended implementing a TIMESTAMP field in each table to improve overall performance.

    I've searched for info on performance benefits of using TIMESTAMP, but only found material on benefits with replication (which we're not doing).

    Can anyone tell me how simply inserting a TIMESTAMP could improve overall performance?

    Thanks!

    Allan


    Thanks!
    Allan

  • I have never heard this either. Have you check with the coworker to find out what they are referring to?

  • It's how you implement optimistic locking. ADO lets you control is via the something criteria property. One way is to just do update based on pkey, another is to include a where clause where oldvalue=newvalue for every column being updated, another is to use the timestamp. Timestamp is quick to check, since if its different something changed, you just don't know what.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Thanks for both of your responses. My co-worker is currently out of town, and I was hoping to get a quick answer.

    Andy, it sounds like you're saying we'd have to write code to perform a comparison of the TIMESTAMP value in the recordset vs. the one in the database at the time of an INSERT or UPDATE.

    Is that correct, or is SQL Server configured to do something automatically if this value has changed in the interim?

    Thanks again!

    Thanks!

    Allan


    Thanks!
    Allan

  • It is also of benefit if you are using full text indexing. Having a timestamp field in your table allows you to perform incremental instead of full updates of the catalogs.

    Regards,

    Andy Jones

    .

Viewing 5 posts - 1 through 4 (of 4 total)

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