Performance Has Been Decreased After Migration.
Mar 13, 2006
Hi,
I have migrated my database from sql server 2000 to sql server 2005,
for migration i have backed up 2000 database and restored that into sql server 2005 databse.
when we are running following insert query is 50% slower in sql server 2005.
truncate table Table1
print getdate()
INSERT INTO Table1 SELECT CONVERT(INTEGER,cust_id ), store_id, MAX(Buydate), COUNT(*) FROM Table2 (NOLOCK) GROUP BY cust_id, store_id
print getdate()
How to increase the performance for the query.
Thanks in advance.
Regards
Manoj
View 7 Replies
ADVERTISEMENT
Mar 4, 2004
I'm trying to store files such as pdfs in my SQL Server as blobs for a particular .NET application and I'm noticing a rather large performance hit when compared to if the pdf was simply stored in the web server's file system.
I have a pdf of 7MB. If this is on a web server it takes roughly 9 seconds to download. When I store the same pdf in my database and then write it onto the page using the code below it takes roughly 40 seconds to display. Can anyone help me to improve this performance difference? Should I not be using this method to store large files?
Dim PdfCol As Integer = 0 ' the column # of the BLOB field
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.Read() Then
Dim mypdf(dr.GetBytes(PdfCol, 0, Nothing, 0, Integer.MaxValue) - 1) As Byte
dr.GetBytes(PdfCol, 0, mypdf, 0, mypdf.Length)
End If
Response.Clear()
Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(mypdf)
Response.Flush()
Response.Close()
View 4 Replies
View Related
Nov 22, 2007
Hi all.
Context: SQL 2000, JDBC 1.2
I have a query with 9 parameters that run as follows (approximate timing):
1. Using prepared statement: 1,7 sec
2. Re-using the same statement: 1,7 sec
3. Using prepared statement, no parameters (the params are hardcoded): 20 ms
4. Using statement+resultset+rs.getFirst: 20 ms
5. from inside SQL analyzer: instantly
So, I observe a problem when using parameters. Do I miss something, do I have to do something?
If the actual query may help, I will post it promptly.
Thx in advance
Denis
View 5 Replies
View Related
Jan 5, 2006
Hi all,
I am wondering if anyone has similar experience.
I did the migration by detaching the database from SQL 2000 running on W2K Pro and attaching it to SQL 2005 running on XP Pro. Some queries with simple aggregate functions such as AVG() have been slowed by at least an order of magnitude. I understand that SQL server can intelligently adapt to improve the performance. I am not sure how much it can improve at this point of time.
H
View 7 Replies
View Related
Apr 11, 2007
Hi,
I have a series of queries which have doubled in the amount of time they take to execute since moving to SQL Server 2005. The queries being performance tested are utilising hardware that is very similar to that of the comparison SQL Server 2000 server. They have 6 CPUs exactly the same and we have swapped RAM around to eliminate that difference.
There are 4 parts to the query suffering performance degredation.
1. Create temporary results table
2. Create (using SELECT INTO) and populate temporary working table 1 - 212,263 rows
3. Create (using SELECT INTO) and populate temporary working table 2 - 5,102 rows
4. Insert into temp results table matches found in temp work table 1 and temp work table 2 - 382 rows
On 2000, the queries take a total of 15 secs. On 2005, they take 30 seconds. Part four of the query takes approx 17 secs on its initial run. However, if i truncate the temp results table and re-run just the last query it only takes 1 sec. Query Plan caching?
I have reviewed the forum for a solution to the problem but with no luck. Many of the solutions presented appear to relate to permanant user tables. Solutions such as UPDATE STATISTICS and recompiling stored procedures have no positive effect. When reviewing the query plans, there are very little differences. Some expected between versions right?
The following code snippet is the query from part 4.
Code Snippet
INSERT #MatchingResults
(Table1IDNo, Table2IDNo, MatchRunNo)
SELECT DISTINCT #Table2.IDNo AS Table2IDNo,
#Table1.IDNo AS Table1IDNo,
1 AS MatchRunNo
FROM #Table1
INNER JOIN #Table2
ON ( #Table2.LastName = #Table1.LastName )
AND ( #Table2.AddressDetails = #Table1.AddressDetails )
AND ( #Table2.Country = #Table1.Country )
AND ( ( #Table2.FirstName = #Table1.FirstName) OR ( #Table1.FirstName = '' ) )
AND ( ( #Table2.Title = #Table1.Title ) OR ( #Table1.Title = '' ) )
The query plan shows a hash join on both servers. I have tried removing the distinct statement and forcing a Loop Join (query hint).
I have also run SQL Profiler. The only differences there appear to be with the "SELECT StatMan" statements.
On 2000, part of the query duration is 1719 and is as follows:
Code SnippetSELECT statman([AddressDetails],[LastName],[FirstName],[Title],[Country],@PSTATMAN)
FROM (SELECT TOP 100 PERCENT [AddressDetails],[LastName],[FirstName],[Title],[Country] FROM [dbo].[#TMCT04042007101009_________________________________________________________________________________________________000000000096] WITH(READUNCOMMITTED,SAMPLE 3.675520e+001 PERCENT) ORDER BY [AddressDetails],[LastName],[FirstName],[Title],[Country]) AS _MS_UPDSTATS_TBL OPTION (BYPASS OPTIMIZER_QUEUE, MAXDOP 1)
On 2005, part of the query duration is 5188 and is as follows:
Code Snippet
SELECT StatMan([SC0], [SB0000]) FROM (SELECT TOP 100 PERCENT [SC0], step_direction([SC0]) over (order by NULL) AS [SB0000] FROM (SELECT [AddressDetails] AS [SC0] FROM [dbo].[#TMCT04042007101009_________________________________________________________________________________________________00000000000E] WITH (READUNCOMMITTED,SAMPLE 7.946877e+001 PERCENT) ) AS _MS_UPDSTATS_TBL_HELPER ORDER BY [SC0], [SB0000] ) AS _MS_UPDSTATS_TBL OPTION (MAXDOP 1)
Its clear that the sampling rate is higher. I assume this could have something to do with it. Can this be modified?
Thank-you for your help in advance..
Cheers
Tim
View 9 Replies
View Related
Nov 6, 2007
I have a specific job that should be run with a decreased memory usage when the workload is heavy on the SQL Server.
This is a heavy job that has no specific requirement when it comes to response time.
It is important that the rest of the application shouldn’t be affected with longer response time when this job is running.
How can this job bee handled from the application, without having to create a separate batch job.
View 1 Replies
View Related
Sep 12, 2004
1. Use mssql server agent service to take the schedule
2. Use a .NET windows service with timers to call SqlClientConnection
above, which way would be faster and get a better performance?
View 2 Replies
View Related
Jun 23, 2006
Hello Everyone,I have a very complex performance issue with our production database.Here's the scenario. We have a production webserver server and adevelopment web server. Both are running SQL Server 2000.I encounted various performance issues with the production server with aparticular query. It would take approximately 22 seconds to return 100rows, thats about 0.22 seconds per row. Note: I ran the query in singleuser mode. So I tested the query on the Development server by taking abackup (.dmp) of the database and moving it onto the dev server. I ranthe same query and found that it ran in less than a second.I took a look at the query execution plan and I found that they we'rethe exact same in both cases.Then I took a look at the various index's, and again I found nodifferences in the table indices.If both databases are identical, I'm assumeing that the issue is relatedto some external hardware issue like: disk space, memory etc. Or couldit be OS software related issues, like service packs, SQL Serverconfiguations etc.Here's what I've done to rule out some obvious hardware issues on theprod server:1. Moved all extraneous files to a secondary harddrive to free up spaceon the primary harddrive. There is 55gb's of free space on the disk.2. Applied SQL Server SP4 service packs3. Defragmented the primary harddrive4. Applied all Windows Server 2003 updatesHere is the prod servers system specs:2x Intel Xeon 2.67GHZTotal Physical Memory 2GB, Available Physical Memory 815MBWindows Server 2003 SE /w SP1Here is the dev serers system specs:2x Intel Xeon 2.80GHz2GB DDR2-SDRAMWindows Server 2003 SE /w SP1I'm not sure what else to do, the query performance is an order ofmagnitude difference and I can't explain it. To me its is a hardware oroperating system related issue.Any Ideas would help me greatly!Thanks,Brian T*** Sent via Developersdex http://www.developersdex.com ***
View 2 Replies
View Related
Jun 22, 2006
Hello Everyone,I have a very complex performance issue with our production database.Here's the scenario. We have a production webserver server and adevelopment web server. Both are running SQL Server 2000.I encounted various performance issues with the production server witha particular query. It would take approximately 22 seconds to return100 rows, thats about 0.22 seconds per row. Note: I ran the query insingle user mode. So I tested the query on the Development server bytaking a backup (.dmp) of the database and moving it onto the devserver. I ran the same query and found that it ran in less than asecond.I took a look at the query execution plan and I found that they we'rethe exact same in both cases.Then I took a look at the various index's, and again I found nodifferences in the table indices.If both databases are identical, I'm assumeing that the issue isrelated to some external hardware issue like: disk space, memory etc.Or could it be OS software related issues, like service packs, SQLServer configuations etc.Here's what I've done to rule out some obvious hardware issues on theprod server:1. Moved all extraneous files to a secondary harddrive to free up spaceon the primary harddrive. There is 55gb's of free space on the disk.2. Applied SQL Server SP4 service packs3. Defragmented the primary harddrive4. Applied all Windows Server 2003 updatesHere is the prod servers system specs:2x Intel Xeon 2.67GHZTotal Physical Memory 2GB, Available Physical Memory 815MBWindows Server 2003 SE /w SP1Here is the dev serers system specs:2x Intel Xeon 2.80GHz2GB DDR2-SDRAMWindows Server 2003 SE /w SP1I'm not sure what else to do, the query performance is an order ofmagnitude difference and I can't explain it. To me its is a hardware oroperating systemrelated issue.Any Ideas would help me greatly!Thanks,Brian T
View 2 Replies
View Related
Jan 26, 2005
I have developed a database on my local machine using MSDE. I am using Visual Studio.net to add tables/stored procedures to the database. I have created asp.net pages. I need to get this database on a web server that runs Enterprise SQL Server. Can I just use the 'sp_detach_db' and 'sp_attach_db' to move the database between servers?
View 4 Replies
View Related
Aug 29, 2001
Hi Everyone,
I am migrating my old sql server database to the new hardware, in the processes I migrated all the databases from old sql server 7.0 to new sql server 7.0, and also generated the scripts for all jobs and executed in the new server, all the jobs appear but when I go and see in the job steps, I don't see any steps in the jobs, I tried different ways but I am not able to get the steps.
Can any one help me out..............
I have about 160 jobs so I cannot make new steps for each and every job.
Thanks in advance.........
Regards,
Madhuker.
View 1 Replies
View Related
Aug 30, 2001
Hi Everyone,
I am migrating my old sql server database to the new hardware, in the processes I migrated all the databases from old sql server 7.0(All tables from MSDB Database, sysjobs, syshistory etc) to new sql server 7.0, and also generated the scripts for all jobs and executed in the new server, all the jobs appear but when I go and see in the job steps, I don't see any steps in the jobs, I tried different ways but I am not able to get the steps.
Can any one help me out..............
I have about 160 jobs so I cannot make new steps for each and every job.
Thanks in advance.........
Regards,
Madhuker.
View 2 Replies
View Related
Sep 20, 2001
I want to do a data transfer but i am not sure how ..from oracle to sql server.
i want to know if its required to install the oracle client to configure so as to transfer data or not.
I heard from someone that if we change the win.ini file entry for oracle.ini and place the tnsnames.ora file i spcified location it will work but it does not what is the way to deal with..
How do i perform this with the odbc configuration for oracle..and use the same in the dts.
Thanks in advance.
View 1 Replies
View Related
May 9, 2000
Hi Every one,
I am upgrading from one computer to another.
I have few questions.
1. Is it neccessary to run the SQL Services on Domain User Account on both machines or on 6.5 machine.
2. How to check the all User logins exists in Master database.(I read in BOL that all user logins must exists in Master Database)
3. How much time it will take to complete for 10 GB database.
Please give me anohter suggetion which will help in this regard.
Thanks,
Dindu.
View 1 Replies
View Related
Aug 28, 2000
Can any one tell me the steps to migrate sql server 7.0 from one server to another server(Production databases). Its a 24x7 shop. The down time should be minimal. Iam looking for a most efficient way of doing that.
View 1 Replies
View Related
Feb 19, 2001
Is it possible to migrate SQL Server 6.5 to 2000? We have an ACtive/Active Cluster Environment. It it's possible, please give me a brief guidance on how to go about it. Thanks for your help.
View 1 Replies
View Related
Aug 11, 1999
has anyone migrated a ms sql 6.5 server to a mssql server 7.0
on 2 different machines? and if so how the heck didja do it?
the 7.0 server keeps telling me that it cant do it until the 6.5 server
is upgraded.....help...help....help....the 7.0 server has the 6.5 one registered it just wont connect to it....tells me that it has to be a 7.0 server.....help
thanks
tony
View 1 Replies
View Related
Jan 28, 2002
What are the differneces between using Backup/Restore vs Copy Database Wizard when Migrating a SQL Server 7.0 Database to SQL Server 2000 ?
View 2 Replies
View Related
Apr 9, 2001
I have to migrate INFORMIX database to SQL Server 7.0 and I was wondering if there is anyone out there with any experience? I want to know the procedures and how to go about it towards a successfully INFORMIX migration to SQL Server. I look forward to hearing from you.
Regards,
View 1 Replies
View Related
Jul 6, 2004
Hi,
Does any one aware of any tool for sybase to ms-sql migration, which will migrate store procedures/triggers from sybase to ms-sql server 2000.
Thanks
Vaishali
View 3 Replies
View Related
Aug 14, 2004
Dear Experts
Can any one please help me in MIGRATION of table from Foxpro 2.5 and MSVisualFoxpro 6 to MSSqlServer 2000
I had a large no of table in foxpro now i want all of them in SQL SERVER 2000
Thanks and Regards
View 2 Replies
View Related
Apr 1, 2004
Hi There,
Greetings! Many of my clients are on SQL 7.0 (Win NT) and want to upgrade to SQL2K (Win 2003). We have approximately 1200 Stored Procedures (SPs) per module.
Our porting exercise involves changing keywords of SQL 7 to SQL2K (eg. LTRIM, RTRIM, GROUP BY etc).
Is there a tool available online which can run thru the SPs and do the porting job? Otherwise I have to hand-code these changes
Also, has any one out there done this exercise before? What are the things to lookout for to avoid goofups?
Thanks in advance
View 2 Replies
View Related
Feb 10, 2006
Hi evrybody,
I have been trying to migrate MY SQL to MSSQL and somehow cant do it.
I tried making Dsn for both of them, but the DTS wizard doesnt recognize MYSQL .
DOes anybody knwo how to do this?
thanks
View 3 Replies
View Related
Jul 20, 2005
We have a SQL 7 server SP3 which we want to replace. The initial planis to create a new SQL 7 server and restore the database backups.My first question is there any need to restore the master databaseonce all the other db's are copied.We had planned to copy the databases and the msdb.Do all the DTS jobs, users, security etc come over in the msdb.Also is there any reason why we shouldn't upgrade to SQL 2000, arethere any compatiability issues with restoring the SQL 7 databasebackups to the SQL 2000 server?Ed
View 1 Replies
View Related
Apr 24, 2006
Hi,
How to migrate scheduled jobs from 2000 to 2005. Is this possible by doing bcp out and bcp in system tables which stores sql agent jobs from msdb database ?
Regards
Nit
View 1 Replies
View Related
Apr 24, 2006
Hi,
In DTS 2000 package dynamic property task an ini file is read and values for some keys are read. These values are nothing but name of servers on which to run some sql tasks. This dts package has three defined connections. So when the keys are read it will be either one of these three.
For eg. there are three sql tasks. sql1, sql 2 and sql3. sql1 needs to be run against server s1, sql2 against s3 and sql3 aginst s2. So the ini file sets three different variables connection1 to s1,connection2 to s3 and connection3 to s2. These variables are then used to run sql tasks accordingly.
When I migrated this dts package to .dtsx format and edited using SSIS, it gave me a blank format of vb script which we need to code. please help me out in this issue ?
Thanks,
Nit
View 2 Replies
View Related
Apr 23, 2006
I try to migrate DTS package to SSIS.
Within one DTS package AAA, it calls another DTS package BBB with inner variable.
I successfully migrate the BBB DTS package.
For my AAA package, I replace the DTS_Execute_Task_2000 with Execute Package task. But how do we pass the inner variable parameter ?
View 3 Replies
View Related
Oct 4, 2007
Soon, i will be asked to carry enterprise databases on an Sql Server 2005 Server x86 edition to Sql Server Server 64-bit editon on another server. I am wondering that is it just fine to detach/attach databases. Is there any trouble that i may face?
Any experience?
View 4 Replies
View Related
Nov 27, 2007
Hi All,
Could you please tell me the Step by step process to Migrate the SQL 2000 DTS packages to SQL Server 2005 SSIS.
Thanks in Advance.
Manoj
View 1 Replies
View Related
Jul 12, 2007
I created a website using Visual web developer express edition (including SQL Express). No the user management section of the site (the login/logout database) was created automatically and SQL Server express was installed at my computer under the instance name of SQLExpress. I uploaded it to my web host and he hooked up the ASPNETDB for me. Now the problem is that ASPNETDB has an id password and I was given the MSSQL Server IP. How do I configure my website to accommodate that? Any help will be extremely useful!!!
View 3 Replies
View Related
Nov 20, 2007
We have an old client server application (vb / sql 2000) we have now converted that application to a web based asp.net / sql 2000. Though the db is same (sql 2000) for both applications, tables/columns has been changed during the development process. Now i need to migrate the data from our old db to this new db. Should this be done the "painful" way of checking each and every table its links/dependencies, columns manually or is there a tool which helps me migrate the data from one db to another (even though the tables/columns are different)Please Help.Thanks.
View 3 Replies
View Related
Apr 12, 2002
I have been asked by my boss to prepare for a migration from SQL Server 6.5 & 7.0 to 2000. Also they want me to produce a consolidation process does anyone have an idea how to go about this? I would be more than happy with any suggestion.
Regards,
View 1 Replies
View Related
May 30, 2001
I have migrated a database from Access to SQL. Promlem is that I cannot edit the records in the now
linked tables. We are still using the Access front end. Why can't we edit the records?
Thanks in advance.
View 7 Replies
View Related