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. Need an Opinion High Processing Vs High Database Queries

Need an Opinion High Processing Vs High Database Queries

Scheduled Pinned Locked Moved ASP.NET
databasecsharpasp-netsql-servervisual-studio
3 Posts 3 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.
  • S Offline
    S Offline
    Spanky3
    wrote on last edited by
    #1

    Hello! I am at a point in my project where.... i could get the informtion which i require by running... A query to find all the valid elements....... which is 1000's and then running a another 2-3 queries on each of these 1000 results. It seems quite alot of database processing. The other way i can do it is. Obtain all the relvent information at the start and manually process it. My question is what would you do I am using Microsoft SQL Server and asp.net with c# I basically need to know if there is any advantages/disadvantages over High Processing Vs Several SQL queries I may be being naive and thinking this amount of queries is wasteful and thats why i have considered the processing method. Atul

    V 1 Reply Last reply
    0
    • S Spanky3

      Hello! I am at a point in my project where.... i could get the informtion which i require by running... A query to find all the valid elements....... which is 1000's and then running a another 2-3 queries on each of these 1000 results. It seems quite alot of database processing. The other way i can do it is. Obtain all the relvent information at the start and manually process it. My question is what would you do I am using Microsoft SQL Server and asp.net with c# I basically need to know if there is any advantages/disadvantages over High Processing Vs Several SQL queries I may be being naive and thinking this amount of queries is wasteful and thats why i have considered the processing method. Atul

      V Offline
      V Offline
      Verdant123
      wrote on last edited by
      #2

      i am doing a similar project, but it seems my project has a few more queries... it automatically updates around between 25,000 and 85,000 rows every 3 hours or so, for each 'update' there is additional processing to be done on every record, including an insert into a secondary table, i found the fastest method was to do most of processing in a stored procedure and have each update and insert only be one stored procedure call (with about 8 queries, ifs, updates, inserts etc inside), rather then a string of seperate queries, i found that having seperate queries really slowed down the process, i also have a "permanently" open sql connection for each of the threads that are doing the updating. also, since the biggest bottleneck in my application is these updates, i don't have any indexes, since the majority of the work is updates/inserts the other thing i did, since the updates are done by a single program, with individual records being affected, was to disable locking...

      A 1 Reply Last reply
      0
      • V Verdant123

        i am doing a similar project, but it seems my project has a few more queries... it automatically updates around between 25,000 and 85,000 rows every 3 hours or so, for each 'update' there is additional processing to be done on every record, including an insert into a secondary table, i found the fastest method was to do most of processing in a stored procedure and have each update and insert only be one stored procedure call (with about 8 queries, ifs, updates, inserts etc inside), rather then a string of seperate queries, i found that having seperate queries really slowed down the process, i also have a "permanently" open sql connection for each of the threads that are doing the updating. also, since the biggest bottleneck in my application is these updates, i don't have any indexes, since the majority of the work is updates/inserts the other thing i did, since the updates are done by a single program, with individual records being affected, was to disable locking...

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thank you, Stored procedures had completed slipped my mind. I'll have a go with stored procedues later and see what i can come up with Atul

        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