Viewing 15 posts - 4,231 through 4,245 (of 7,614 total)
1) Don't use ISNULL, you don't need it there anyway:
select c1,c2,c3 From numbers
where c3 <> 'CP-961080'
2) A nonclustered index lookup would be very inefficient here, although you might be able...
August 3, 2016 at 4:45 pm
I believe that SQL itself has an internal limit on how large of a log file it can use, so the max log size is set to that. No...
August 3, 2016 at 1:58 pm
Probably the easiest way is to use derived tables within a main query, like below, assuming that each derive table returns only a single row:
SELECT q1.*, q2.*, q3.* --, ...
FROM...
July 28, 2016 at 10:40 am
In theory, it's also possible that you could get any 1,000 rows that are already present in buffers and thus don't require physical I/O. Without an ORDER BY, any...
July 27, 2016 at 4:33 pm
Some things to check, roughly in order:
1) Verify that a valid and reasonable "max memory" value is set in SQL Server.
2) Verify that IFI is turned on in Windows to...
July 27, 2016 at 10:11 am
I can't imagine any tool that would be able to do that, given that each view level could be arbitrarily complex.
July 26, 2016 at 10:55 am
mike 57299 (7/25/2016)
July 25, 2016 at 1:17 pm
I agree overall with Alan's comments. If you're willing to convert existing code/queries, also look into an itvf to do the computation.
However, for now, let's tune what you have....
July 25, 2016 at 11:51 am
Jeff Moden (7/21/2016)
ScottPletcher (7/21/2016)
Jeff Moden (7/20/2016)
ScottPletcher (7/20/2016)
July 21, 2016 at 12:02 pm
Jeff Moden (7/20/2016)
ScottPletcher (7/20/2016)
July 21, 2016 at 10:23 am
If the "isactive" flag is significant, i.e. a significant number of rows are actually inactive, then cluster first on it. If not, get rid of it. At the...
July 20, 2016 at 1:43 pm
You could use a standard unique constraint if you continually deleted searches 2 hours or more old from the table. For example, have a job that deletes rows every...
July 20, 2016 at 12:45 pm
The "standard/best-practice" way to get yesterday's date is:
DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()) - 1, 0)
Based on that, then make the necessary 6-hour adjustment on the starting time [the "+" in the...
July 18, 2016 at 4:41 pm
While logged in as sysadmin, create a stored proc that includes "WITH EXECUTE AS OWNER". In that proc, have the command:
EXEC msdb..sp_start_job @job_name = @job_name, ...
Then GRANT the role(s)/user(s)...
July 11, 2016 at 2:01 pm
To do any proper type of index tuning, you must have access to at least:
missing index stats, via sys.dm_db_missing* views;
index usage stats, via sys.dm_db_index_usage_stats;
index operational stats, via sys.dm_db_index_operational stats.
With that,...
July 11, 2016 at 11:46 am
Viewing 15 posts - 4,231 through 4,245 (of 7,614 total)