I have a SQL Server 2008 R2 which is 64 bit. Recently I have been observing that there is a huge performance issue in the server. The physical capacity of the server is 28GB. This server is the data warehouse and contains tables having records more than 4 Million.
Whenever a job runs , the memory consumption goes to 98% and the execution rate is extremely slow reaching one record per minute.The job is run through SSIS package.
I want to know what is causing the issue and any help on this
Related
I am using odbc.eval on KDB to run a SQL stored procedure that generates over tens of millions of rows of data. We have 2 different RDBs (SQL Server 2012 and SQL Server 2016) set up with the same data, allocated memory, etc. The KDB code works against one of them, but doesn't work against the other. For the newer server, KDB crashes midway through the query. The stored procedure seems to work on SQL Management Studio 2016 just fine, though it does take a long time to fully execute - around an hour or so. Could this be a time-out error? Any suggestions for running a SQL query with this large amount of data on KDB without running into memory or timeout issues?
Good day.
Need to get records from an Oracle database to a database in SQL Server. The data source type (ODBC) the performed using a SQL command, where I am taking all possible indices according to my requirement. The process runs fine, the problem is that it takes a long time and I need to be something quick. The process can not be performed with lookup, requires merge or merge join, simply load a table from Oracle to SQL under certain conditions.
Thank you for your help
Check what is your limiting factor. Generally there are 3 points to check:
Remote server is slow.
Source DB can run low on memory, read speed or free CPU. Substitute you query with a straight SELECT statement with no WHERE clause or JOINs and see if your SSIS package runs faster.
Target DB.
You may have indexes enabled, high write latency on HDD or not enough CPU.
Run an INSERT for your target table and see how longer it takes.
Problem may be in the middle: transfer between 2 servers. Network usually is main bottleneck. Is SSIS hosted on the same server as SQL server? then you have 2 network connections + possible hardware bottleneck on dedicated SSIS machine.
Depending on the bottleneck there are different solutions.
If you have network capacity and bottleneck is 1 CPU per query on Oracle, then you can partition your data horisontally (IDs 1 to 100, 101 to 200 etc); establish multiple connections to Oracle and load data in several streams. Number of streams is 1 less then number of CPUs on Oracle, SSIS or SQL Server (which ever is smaller).
I have a procedure that fills up a bunch of regular and temp tables with millions of records and takes hours to complete. Its no problem when I run it alone.
However, I've been trying to improve performance and am trying a SQL Profiler tuning trace. Now the procedure bombs every time with :
Could not continue scan with NOLOCK due to data movement.
If I turn off SQL Profiler it works again. My system is SQL R2 64 SP2 on a Dell Precision T5400 quad Xeon, 8gb RAM and plenty of storage capacity (3tb) on W2k8 Server 64 (latest sp).
The solutions to this query was to reduce the complexity of the query. It was inserting millions of records in one big load. I broke it into several smaller loads and this error went away.
Time of Get Script From My Database In SQL Server Management Studio 2008 R2 is about 45:00 Minute.
count of tables : 380
Count of views : 89
Count of SP : 109
look your tempdb, sometimes, the operation is slow, maybe sqlserver divide space for other objects.
This speed will depends on you system's or server's configuration. If you system's configuration is low in that case it will takes much more time. Second this will depends on you database size suppose you are saving images or pdf files in binary mode in database in that case it will takes long time to generate scripts.....
I have two servers I'm doing development on and I'm not a DBA, but we don't have one so I'm trying to figure out some performance issues I'm having. Locally I have SQL Server 2008 R2 installed and when an ORM that I'm using runs a query it returns the results in less than a second. When I run that exact same query on our development server with is SQL Server 2005, it takes over a minute. I've looked at the execution plan on both of them the main thing that sticks out is the last two lines of the query has a order by statement. On the 2005 server this is 100% of the cost. on the 2008 server its 0% of the cost. Is there some sort of setting I'm overlooking? Both servers have approximately the same data in them and the same indexes/keys/etc.....since the local copy is just a restore from a backup.
My best guess is the 2005 server is sorting all the tables and then giving me the results (200 lines). Where the 2008 server is getting all the results and then sorting them. (200 results also.)
Link to slow execution plan: http://pastebin.com/sUCiVk8j
Link to fast execution plan: http://pastebin.com/EdR7zFAn
I would post the query but it is obnoxiously long because I have a bunch of includes and its Entity Framework that is generating the query.
Thank you in advance.
Edit: I opened Task manager on the SQL server this is running on and the CPU goes to 100% during the execution of this query.
Edit: Added XML version to jsfiddle.net. pastebin wouldn't allow me to because of the size. Just used the CSS window for the XML.
Actual 2008R2: http://jsfiddle.net/wgsv6/2/
Actual 2005: http://jsfiddle.net/wgsv6/3/
Hard to tell without seeing the query, but is it possible you are missing an INDEX on the slow server?
THe statistics could be out of date on the dev server.