SQL Server Performance

Whats quicker: Database info or XML

Discussion in 'General Developer Questions' started by abradley81, Jul 15, 2006.

  1. abradley81 New Member

    Yes, its a general question, but here's my scenario.

    At every page I need to look up a few columns of information. So for every user and every page about 5 columns of info is given to the page, which is looked up by an ID number.

    Question is, should I have that ID number do a quick select statement for the info every page load, or find the info in an XML file of about 200 rows????

  2. satya Moderator

    If the ID number is an identity column then the results will be quicker or the depending upon the index selection on table.

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    This posting is provided �AS IS� with no rights for the sake of knowledge sharing.
  3. spacemonkey New Member

    XML can be very nice but if you are looking to maintain the file for a while it would probably be to your advantage to just make it a database side select. I don't know that with 200 rows of data that you would see any real performance gain either way.

    You may, however, add several new users over time and a clustered index may prove to be faster as rows are added. Plus you get nice things like triggers and check constraints.


Share This Page