Viewing 12 posts - 46 through 57 (of 57 total)
As previous post indicated you will not get it to do an index seek. Best it will be able to do is index scan.
If your table is wide (lots of...
March 6, 2015 at 8:42 am
This may not be the most efficient but should work...
CREATE TABLE EmployeeDetails (empid int, workdate date, workedhours int)
SELECT
empid,
[Week] = (SELECT SUM(workedhours) FROM EmployeeDetails w WHERE w.empid = e.empid...
March 6, 2015 at 8:18 am
If you know that there will be no more dups added then a quick way to temporarily fix this is to create a single column called [old_data] or something. Write...
March 6, 2015 at 8:06 am
In my experience you get parallel when a query has multiple objects where it can use separate threads to read separate objects. In an update statement you have locking to...
March 6, 2015 at 8:00 am
If the database is in FULL recovery mode you must back up the log file. Backing up the log file will not make the file smaller but will release space...
July 14, 2014 at 10:56 am
This will give you information about which indexes are used. Won't tell you what indexes you need but might tell you a few that you don't. Replace TABLENAME beow with...
January 8, 2014 at 4:37 am
The data is incremental. The totals are not all that useful but I have found it useful to collect/sample the data regularly, perhaps every hour. Then compare each sample with...
April 27, 2010 at 5:15 am
Seen this with partitioned tabled. You will get one row for each partition.
April 27, 2010 at 5:06 am
Check fragmentation on the tables. Read somewhere that fragmentation can affect the ability to read ahead.
March 23, 2010 at 7:22 am
Change this:
WHERE AppName LIKE COALESCE(@AppName, '%')
to this:
WHERE AppName LIKE '%'+@AppName+'%'
March 18, 2010 at 11:07 am
Statistics can play a big part in the execution path SQL chooses even where there is a non-clustered index. You will find a query does a table scan instead of...
March 18, 2010 at 11:03 am
Check out Teleran. They have products that can collect information by setting itself up as a proxy and sniffing requests and results. This means zero impact on the sql server...
March 16, 2010 at 6:19 am
Viewing 12 posts - 46 through 57 (of 57 total)