How to improve query performance on large table in MS SQL Server 2008?

How to improve query performance on large table in MS SQL Server 2008?

1) Partitioning of table, depand on you data on with you decide the diffrent partition. Placing a diffrent partition in diffrent filegroup resides over diffrent physical partion disk will give benefit 2) Spliting tables into small tables depand on you applciation & database usage.

Which is an example of a complex SQL query?

In SQL and PL SQL interviews we require to know the key and important complex sql queries in detail level. These are important Complex SQL Queries : 1.Query to find Second Highest Salary of Employee? (click for explaination) Select distinct Salary from Employee e1 where 2=Select count (distinct Salary) from Employee e2 where e1.salary<=e2.salary;

How is query optimization done in SQL Server?

The reads have been cut down from 1.2 million to 750, and the query executed in well under a second, rather than in 2 seconds. Note that there are still a boatload of index scans in the execution plan, but despite the need to scan tables four times to satisfy our query, performance is much better than before.

How does Union in SQL Server improve performance?

UNION concatenates the result set and removes duplicates. Here is the resulting performance: The execution plan got significantly more complex, as we are querying each table twice now, instead of once, but we no longer needed to play pin-the-tail-on-the-donkey with the result sets as we did before.

How big is the database in SQL Server?

We have a Windows 2008 R2 / SQL Server 2008 R2 (Standard) server that is used to host a single database. The database itself mainly consists of a single large table containing both live and historical data. The table is currently 101 million rows of 35 columns, and growing at the rate of around 250,000 rows a day.

What are the execution times of SQL Server?

SQL Server Execution Times: CPU time = 3945 ms, elapsed time = 148524 ms. The server is pretty powerful (from memory 48GB ram, 24 core processor) running sql server 2008 r2 x64. I found this code to create a table with 1,000,000 records.

Why does clustered index not work in SQL Server?

Create index ,but if your table is going to have frequent DML operations,having clustered index will be a costly operation.Because if you are inserting new records,clustered index to maintain order of data in index page,it has to insert data in particular page,consider if that page is already full,it may result in page splits.