Speed problem with MSSQL server database
-
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
-
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
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.
-
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.
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