Wednesday, March 21, 2012
How many records can handle?
I have a replication procedure in my ASP file and also i am using the stored procedure for inserting records.
My doubt is i have 67500 records in my Text file. I am trying to insert each line into my sqlserver dB.
Sqlserver can handle this replicaton..?I don't know if this will help, but as a comparison, we have a few upload processes written in Cold Fusion that takes various files (including CSV, Excel, and Text) and inserts/updates records on the fly in one of our SQL Server databases, and the records inserted/updated are in the upper limits of 100,000 per file.
Couple things to think about:
1) Make sure that you have identified a long time-out period in your ASP script, since that will affect the processing time, meaning that if you don't increase the time threshold in your script, than the script will probably time out.
2) Make sure that you set your SQL Server for a longer time-out period for receiving requests.
Q: Are you planning on running this process in the background, like as a Scheduled Task -or- is this is a script you'll be running from the web browser?|||When i submit the form it has to be generate and save it into Database. so upto that the form should be appering in same position.|||Originally posted by buddu
When i submit the form it has to be generate and save it into Database. so upto that the form should be appering in same position.
Sorry, I don't understand your response. Could you provide more details about your end goals of this particular project?sql
Friday, March 9, 2012
How is the Performance of the SQL with .Net?
Hi
I want to insert 1000s of records into SQL Server 2005 Database with some manipulation. So that i put into the For Loop and inserting record.
Inside the loop i am opening the connection and closing after use. The sample code is below
for(int i=0;i<1000;i++)
{
sqlCmd.CommandText = "ProcName";
sqlCmd.Connection = sqlCon;
sqlCmd.Connection.Open():
sqlCmd.ExecuteNonQuery();
sqlCmd.Connection.Close();
}
What my Question is.. How is the Performance of this Code..?? Will is take time to get the Connection and Close the Connection in every itration?
Or Shall I Open the Connection in Begining of the outside loop and close the connection at end of the Loop? will it increase the Performace?
Please clarify me these question.. Thanks in advance.
Hi,
Opening a connection and closing it takes a lot of extra resources, so use following.
1sqlCmd.CommandText ="ProcName";2sqlCmd.Connection = sqlCon;3sqlCmd.Connection.Open():45for(int i=0;i<1000;i++)6{7 sqlCmd.ExecuteNonQuery();8}910sqlCmd.Connection.Close();11
Sunday, February 19, 2012
How format COMPUTE results?
SELECT ARBalance
FROM Invoice
compute SUM(ARBalance)
I have tried inserting variations from below with no luck:
CONVERT(varchar, CAST(SUM(Invoice.ARBalance) AS money), 1)
Thanks!Why don't you apply string formatting at the client/presentation tier? VB
has Format(), VBScript/ASP have FormatNumber() and FormatCurrency(), etc.
A
"Mike Harbinger" <MikeH@.Cybervillage.net> wrote in message
news:eelASapnFHA.3036@.TK2MSFTNGP14.phx.gbl...
> Is it possible to format ARBalance below with commas?
> SELECT ARBalance
> FROM Invoice
> compute SUM(ARBalance)
> I have tried inserting variations from below with no luck:
> CONVERT(varchar, CAST(SUM(Invoice.ARBalance) AS money), 1)
> Thanks!
>|||Hi
Formatting is really a function of the client, for instance if you are using
Query Analyser the "Use regional settings when displaying currency, number,
dates and times" check box on the connection tab does this.
John
"Mike Harbinger" wrote:
> Is it possible to format ARBalance below with commas?
> SELECT ARBalance
> FROM Invoice
> compute SUM(ARBalance)
> I have tried inserting variations from below with no luck:
> CONVERT(varchar, CAST(SUM(Invoice.ARBalance) AS money), 1)
> Thanks!
>
>|||Noye that COMPUTE is a deprecate feature. Use CUBE, ROLLUP or make the SUM
part of your query.
David Portas
SQL Server MVP
--|||Now how did I miss that! Thanks to all
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:03BC582C-EEA5-4AD2-BC33-B1CE1ED1A5AD@.microsoft.com...
> Hi
> Formatting is really a function of the client, for instance if you are
> using
> Query Analyser the "Use regional settings when displaying currency,
> number,
> dates and times" check box on the connection tab does this.
> John
> "Mike Harbinger" wrote:
>