Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. bulk update

bulk update

Scheduled Pinned Locked Moved ASP.NET
databasesql-serverdata-structuresperformancequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    karanba
    wrote on last edited by
    #1

    Hi. I need advice on a manner; There are lots of items, that I must count for user hits on them. I use mssql to handle item and hit data. There is need to update hit value on time. There for best performance which way is the best? Or could you give a better advice? 1. make an global array in application state and gather hit values for items in this array. When the array total hit count reaches to a big value (for ex: 10000 hits counted). Make update to all items hit field in the database with; (1.a) with a loop over hit array (1.b) write a sql text file and triger mssql to execute this sql command file. 2. update item hit value on every hit item_table id | hit ----------- 1 | 54 2 | 48 3 | 13 4 | 80 . . . thanx

    karanba

    J 1 Reply Last reply
    0
    • K karanba

      Hi. I need advice on a manner; There are lots of items, that I must count for user hits on them. I use mssql to handle item and hit data. There is need to update hit value on time. There for best performance which way is the best? Or could you give a better advice? 1. make an global array in application state and gather hit values for items in this array. When the array total hit count reaches to a big value (for ex: 10000 hits counted). Make update to all items hit field in the database with; (1.a) with a loop over hit array (1.b) write a sql text file and triger mssql to execute this sql command file. 2. update item hit value on every hit item_table id | hit ----------- 1 | 54 2 | 48 3 | 13 4 | 80 . . . thanx

      karanba

      J Offline
      J Offline
      just3ala2
      wrote on last edited by
      #2

      I think that the first option is better but u don't need to make it like 1000 because if the server is restarted or any other technical problem occured the values will be resetted ...

      Best Regards 3ala2 :)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups