Viewing 15 posts - 4,441 through 4,455 (of 5,393 total)
I don't know the number of rows it will return, but your non-ansi query translates to this:
select Count(*)
from dbo.it_1_Revenue__Costs rev
left outer join dbo.et_Summary_Income_Statement inc
...
-- Gianluca Sartori
April 16, 2010 at 6:16 am
COldCoffee (4/16/2010)
Do u think SET ROWCOUNT will...
-- Gianluca Sartori
April 16, 2010 at 6:07 am
Looking at the exec plan, you will see that the TOP operator is applied as last.
Looking at the estimated row counts, you'll see that it can actually be applied as...
-- Gianluca Sartori
April 16, 2010 at 4:16 am
I don't know what would Jeff do and it probably would be better than whatever I my suggest...
That said, here's my two cents:
-- Hope Jeff doesn't mind I borrowed his...
-- Gianluca Sartori
April 14, 2010 at 9:23 am
I forgot to add one line of code to the function... sorry.
ALTER FUNCTION dbo.FirstToken(@Parameter VARCHAR(8000))
RETURNS varchar(500)
AS
BEGIN
SET @Parameter = ',' + @Parameter + ','
...
-- Gianluca Sartori
April 14, 2010 at 9:13 am
evald (4/14/2010)
Hi Gianluca,This is the first time i hear about a tally table.
Take a look at that article, it's an eye-opener. I'm sure you'll find it enlightening.
I have simply created...
-- Gianluca Sartori
April 14, 2010 at 8:38 am
This should do the trick:
CREATE FUNCTION dbo.FirstToken(@Parameter VARCHAR(8000))
RETURNS varchar(500)
AS
BEGIN
RETURN (
SELECT TOP 1 SUBSTRING(@Parameter,N+2,CHARINDEX(',',@Parameter,N+1)-N-2)
FROM dbo.Tally
WHERE N < LEN(@Parameter)
AND SUBSTRING(@Parameter,N,1) = ','
ORDER BY N
)
END
CREATE TABLE Test (
valueList varchar(8000),
firstValue as dbo.FirstToken(valueList)
)
INSERT INTO...
-- Gianluca Sartori
April 14, 2010 at 7:24 am
Creating indexes will slow down writes, but will improve read performance.
What exactly is unclear to you of the above?
-- Gianluca Sartori
April 14, 2010 at 7:01 am
I could say at a first glance that you are using a #temp table that could be avoided using a CTE, but there's much more that could be involved in...
-- Gianluca Sartori
April 14, 2010 at 6:59 am
I could say at a first glance that you are using a #temp table that could be avoided using a CTE, but there's much more that could be involved in...
-- Gianluca Sartori
April 14, 2010 at 6:59 am
With the information you provided it's impossible to give an answer.
You could start by reading this[/url].
-- Gianluca Sartori
April 14, 2010 at 6:52 am
Index fragmentation or statistics not up to date cannot be the cause of such an issue, if the destination table(s) is only populated by the job. Index fragmentation an outdated...
-- Gianluca Sartori
April 14, 2010 at 6:41 am
Paul White NZ (4/14/2010)
Stefan_G (4/14/2010)
Paul, I find your knowledge of the internal workings of SQL Server very impressive.How do you know all this internal stuff ?
Thanks very much, Stefan. ...
-- Gianluca Sartori
April 14, 2010 at 2:31 am
Stefan_G (4/13/2010)
I ran the same test on my unloaded 2-CPU laptop and I got the...
-- Gianluca Sartori
April 13, 2010 at 6:41 am
First of all, thank you for you reply, Paul.
Very informative and precise, as usual.
I forgot to mention that I ran these tests on my dev server (8 dual core...
-- Gianluca Sartori
April 13, 2010 at 6:38 am
Viewing 15 posts - 4,441 through 4,455 (of 5,393 total)