Viewing 15 posts - 316 through 330 (of 388 total)
SELECTCEA.Company, CEA.dateinserted, CEA.employees
FROM( SELECTCompany, dateinserted, employees,
RANK() OVER ( PARTITION BY company ORDER BY employees DESC ) AS Ranking
FROMCompanyEmployeeArchive ) window
INNER JOIN CompanyEmployeeArchive AS CEA ON window.company = CEA.company
WHEREwindow.employees...
April 2, 2015 at 5:24 am
This will give you operational info behind the stats where there have modifications. You will have to interpret this info, cos 10000 modifications is not worth an update statistics if...
March 31, 2015 at 7:42 am
When using Filtered indexes, just be careful of Procs where Quoted_Identifier is OFF for the update inserts.
You can find this by selecting * from sql_modules where quoted_identifier is off, to...
March 31, 2015 at 6:51 am
compare the 2 updates below.
From looking at the plan of the update on the windowed result set, it looks like there is one access to the table, whereas the "before"...
March 30, 2015 at 8:43 am
Sorry, edited my post.
I think it is for information because when I script a disabled constraint then the follow up alter table has NOCHECK.
Maybe someone who coded the scripting feature...
March 27, 2015 at 8:16 am
The first statement will create the FK.
Maybe they include second for information to let the reader know it is enabled?
If you do
ALTER TABLE [dbo].[MyTable] WITH CHECK ADD ...
March 27, 2015 at 7:55 am
Just to add my 2 pence, did you know that you can query the dmv's and retrieve all the queries where the plans include operations on the index. So you...
March 24, 2015 at 3:11 pm
Query cost is a baseline, where a SQL Server lab in Redmond was used to baseline the cost thousands of years ago.
What I do is use the numbers in this...
March 24, 2015 at 12:16 pm
Check to make sure that you are not rebuilding indexes and updating stats within the same time period with 2 separate jobs.
May be that you intended to do update stats...
March 24, 2015 at 12:00 pm
Script out your table.
Maybe the table name exists twice, one in its own schema.
Maybe you are querying a view of the table.
So, script out the table with schema names, script...
March 24, 2015 at 11:36 am
19 indexes? Epic!
In addition to TheSqlGuru's great advice,
before you drop indexes, take note that there are some heroes who do silly things like drop and create indexes in SSIS packages...
March 24, 2015 at 11:31 am
try using IsDate() and then return error codes if not.
March 17, 2015 at 4:33 am
Take into account that table variable stats is hard coded to be 1 row where temp table has actual row count.
This would be something to consider as Table variable might...
March 17, 2015 at 4:25 am
It would be cool if you could submit your results of set statistics io on and set statistics time on for the not exist and also the left join where...
March 17, 2015 at 4:21 am
Will this work for you?
declare @Proc sysname = 'uspGetEmployeeManagers'
;WITH stored_procedures AS (
SELECT
o.name AS proc_name, oo.name AS table_name,
ROW_NUMBER() OVER(partition by o.name,oo.name ORDER BY o.name,oo.name) AS row
FROM sysdepends d
INNER JOIN...
March 16, 2015 at 12:42 pm
Viewing 15 posts - 316 through 330 (of 388 total)