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. General Programming
  3. C / C++ / MFC
  4. Speed problem with MSSQL server database

Speed problem with MSSQL server database

Scheduled Pinned Locked Moved C / C++ / MFC
databasesql-serversysadmincssperformance
3 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.
  • F Offline
    F Offline
    Frederico Levesque
    wrote on last edited by
    #1

    Hi, I have a big speed problem... I'm working on a database and I access it on a SQL server on local network.. It takes me about 1 minute to write 7000 records... That's way to slow! I thought at first it could be the network speed that would make it slow but I made tests with an MS Access database on the same network and without changing a line of code, writing 7000 records takes less than a second!!! So the network is not the problem... Could the problem be in my code? Or is it MSSql that is to slow? Somebody have an idea on that? It would be very appreciated! Thanks Frederico

    C 1 Reply Last reply
    0
    • F Frederico Levesque

      Hi, I have a big speed problem... I'm working on a database and I access it on a SQL server on local network.. It takes me about 1 minute to write 7000 records... That's way to slow! I thought at first it could be the network speed that would make it slow but I made tests with an MS Access database on the same network and without changing a line of code, writing 7000 records takes less than a second!!! So the network is not the problem... Could the problem be in my code? Or is it MSSql that is to slow? Somebody have an idea on that? It would be very appreciated! Thanks Frederico

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      How you are inserting records? With Insert or with a Store Procedure? Do Inserts is slow in SQL Server, is More quick To execute a Store Procedure that make the insert.:) Carlos Antollini.

      F 1 Reply Last reply
      0
      • C Carlos Antollini

        How you are inserting records? With Insert or with a Store Procedure? Do Inserts is slow in SQL Server, is More quick To execute a Store Procedure that make the insert.:) Carlos Antollini.

        F Offline
        F Offline
        Frederico Levesque
        wrote on last edited by
        #3

        I'm using MFC class CRecordset. I create a class derived from CRecordset and bind all fiels to the database fields. Then I create an instance of that class and establish the connection through an ODBC an a CDatabase object. CTableOneSideData* cxOneSide = new CTableOneSideData(cxDatabase); //open the table if(cxOneSide->Open(NULL)) { if (cxOneSide->CanAppend()) { //insert values into fields } cxOneSide->Update(); } Could you tell me more about Store Procedure? Thanks a lot. Frederico

        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