Viewing 15 posts - 3,781 through 3,795 (of 5,393 total)
As Dave pointed out, the IN predicate doesn't work that way.
You may also concatenate in a safer way, using FOR XML PATH.
Concatenating variables in the SELECT list doesn't always work...
-- Gianluca Sartori
October 18, 2010 at 3:53 am
OK, looks like I've got it working:
ALTER FUNCTION [dbo].[alias2dnsname] (
@alias NVARCHAR(50)
)
RETURNS TABLE
AS
RETURN (
WITH zones...
-- Gianluca Sartori
October 18, 2010 at 3:39 am
TheSQLGuru (10/15/2010)
amazingly good maintenance stuff here: ola.hallengren.com. You can have it update statistics on indexes that are not defragged at all or are only reorg'd.
Thanks for the tip,...
-- Gianluca Sartori
October 18, 2010 at 1:33 am
It will probably be listed in the top 20 queries by CPU:
SELECT TOP 20
query_stats.sql_handle,
SUM(query_stats.total_worker_time)...
-- Gianluca Sartori
October 15, 2010 at 4:49 am
Is it OLTP or OLAP?
OLTP databases that use 100% CPU equals (most often) evil query. Find the offending query and fix it.
With a typical OLTP workload, CPU should stay low.
If...
-- Gianluca Sartori
October 15, 2010 at 4:27 am
steveb. (10/15/2010)
-- Gianluca Sartori
October 15, 2010 at 4:16 am
I use a special keyboard without the F5 key. 😛
Seriously, the main thing is avoiding experiments in production.
You experiment on the test server, then move working code to production.
Never, ever...
-- Gianluca Sartori
October 15, 2010 at 4:03 am
Thanks George.
I think I'm on the right track, but sometimes, since I set up this plan, the optimizer decides to pick a very odd plan.
Odd plan + 75 mln rows...
-- Gianluca Sartori
October 15, 2010 at 3:54 am
When you're telling the truth, nobody should feel offended! 🙂
-- Gianluca Sartori
October 15, 2010 at 3:06 am
george sibbald (10/14/2010)
Gianluca Sartori (10/14/2010)
My index rebuild job updates statistics with sp_udatestats.
Just in case you did not realise Gianluca this step may be superfluous. If your index rebuild is the...
-- Gianluca Sartori
October 15, 2010 at 2:01 am
Ninja's_RGR'us (10/14/2010)
optimising makes it 10 times worse?
Then I would suggest that someone sucks at optimizing :hehe:
I'm glad you got this figured out.
:hehe::hehe::hehe::hehe: This is defintely the case with me!
-- Gianluca Sartori
October 15, 2010 at 1:59 am
Fortunately this is not what I'm doing. I'm setting fillfactor only for two tables, that are the most important tables in my database. They're heavily read and written, most updated...
-- Gianluca Sartori
October 15, 2010 at 1:58 am
Thanks for the suggestions, but I tried both and they don't seem to dellocate internal objects.
Probably that's the reason why MS decided to ship FREESYSTEMCACHE with SQL2005.
-- Gianluca Sartori
October 15, 2010 at 1:12 am
This seems to do the trick:
ALTER FUNCTION [dbo].[alias2dnsname] (
@alias NVARCHAR(50)
)
RETURNS TABLE
AS
RETURN (
WITH zones AS (
SELECT dnsname, alias
FROM dnszone AS A
WHERE A.alias...
-- Gianluca Sartori
October 14, 2010 at 10:16 am
Viewing 15 posts - 3,781 through 3,795 (of 5,393 total)