Viewing 15 posts - 1,501 through 1,515 (of 2,462 total)
GilaMonster (5/14/2015)
Alan.B (5/14/2015)
-- Itzik Ben-Gan 2001
May 14, 2015 at 9:21 am
Why no PK and/or clustered index?
Add a primary key to ID and you get a clustered index scan:
CREATE TABLE dbo.tbl_Login_Details(ID INT IDENTITY, Session_SRNO INT, CONSTRAINT PK_Login PRIMARY KEY(ID));
INSERT dbo.tbl_Login_Details
SELECT...
-- Itzik Ben-Gan 2001
May 14, 2015 at 9:14 am
You are saying that you have a stored procedure with this code in it:
EXEC PROC udp_TableUpdateALL (This calls 12 separate table updates)
SELECT * FROM UpdatedTable?
There is no reason that should...
-- Itzik Ben-Gan 2001
May 14, 2015 at 8:13 am
Have you checked the data types? Some datatypes can't have statistics...
From BOL:
column [ ,…n]
Specifies the key column or list of key columns to create the statistics on. You can...
-- Itzik Ben-Gan 2001
May 13, 2015 at 10:14 pm
DECLARE @issues TABLE(Issues varchar(5), Category char(1), IssueDate date);
INSERT @issues VALUES
('I1','A','1/1/2015'),
('I2','A','2/2/2015'),
('I3','B','2/1/2015'),
('I4','C','3/3/2015'),
('I5','B','4/3/2015'),
('I6','A','5/4/2015');
SELECT * FROM @issues;
SELECT
mo.m,
A = SUM(CASE WHEN Category = 'A' THEN 1 ELSE 0 END),
...
-- Itzik Ben-Gan 2001
May 13, 2015 at 8:00 pm
RECOMPILE and Copying the parameter as a local variable will likely eliminate that possibility of parameter sniffing.
If you normally get 10-15K reads then it goes up to 1.5M reads,...
-- Itzik Ben-Gan 2001
May 13, 2015 at 4:59 pm
You can apply what I'm going to show you to your data. If you want to prove that what you are recommending is faster then visual proof is often the...
-- Itzik Ben-Gan 2001
May 13, 2015 at 4:48 pm
First, welcome to SQL Server Central! See the link in my signature line to the article on how to best ask questions here. The small amount of time it takes...
-- Itzik Ben-Gan 2001
May 13, 2015 at 9:58 am
I don't understand from your explanation what that other table is doing for you.
Adding to what Bill said - why not remove all indexes and constraints from the table...
-- Itzik Ben-Gan 2001
May 13, 2015 at 9:33 am
Hard to say, it could be a lot of things. What I can say for sure is splitting the data into more files will help and separating the ldfs and...
-- Itzik Ben-Gan 2001
May 12, 2015 at 10:36 pm
I have nothing to add to this post except to say that I love the title, "Sum Help". It would be even better if the title was, "I need sum...
-- Itzik Ben-Gan 2001
May 12, 2015 at 10:07 pm
Tac11 (5/12/2015)
SELECT DB_NAME(fs.database_id) AS [Database Name], mf.physical_name, io_stall_read_ms, num_of_reads,
CAST(io_stall_read_ms/(1.0 + num_of_reads) AS NUMERIC(10,1)) AS [avg_read_stall_ms],io_stall_write_ms,
num_of_writes,CAST(io_stall_write_ms/(1.0+num_of_writes) AS NUMERIC(10,1)) AS [avg_write_stall_ms],
io_stall_read_ms +...
-- Itzik Ben-Gan 2001
May 12, 2015 at 12:14 pm
I love this article Dwain. Very good work as always. 5 stars from me. I particularly enjoy how your hierarchies example - very clever.
I do want to add -...
-- Itzik Ben-Gan 2001
May 12, 2015 at 6:08 am
peter-757102 (5/12/2015)
I distinctly remember that in the past any function used in a constraint needed to be deterministic.
Querying a table violates that rule, obviously.
When did this...
-- Itzik Ben-Gan 2001
May 12, 2015 at 5:49 am
Jeff Moden (5/11/2015)
Alan.B (5/11/2015)
If you are talking about...
-- Itzik Ben-Gan 2001
May 11, 2015 at 2:50 pm
Viewing 15 posts - 1,501 through 1,515 (of 2,462 total)