Viewing 15 posts - 4,441 through 4,455 (of 5,394 total)
You have to switch off the partitions you don't want any more with ALTER TABLE {table_name} SWITCH PARTITION {partition number} TO {destination table}. Thereafter you can drop the table if...
April 16, 2010 at 8:56 am
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
...
April 16, 2010 at 6:16 am
COldCoffee (4/16/2010)
Do u think SET ROWCOUNT will...
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...
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...
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 + ','
...
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...
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...
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?
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...
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...
April 14, 2010 at 6:59 am
With the information you provided it's impossible to give an answer.
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...
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. ...
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...
April 13, 2010 at 6:41 am
Viewing 15 posts - 4,441 through 4,455 (of 5,394 total)