Viewing 15 posts - 4,006 through 4,020 (of 5,841 total)
>>they're a last resort
No, forums are NOT the last resort! If you can't figure it out for yourself, don't have someone at work to assist, can't get someone to...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 13, 2010 at 8:47 am
I don't think you need a 'moving aggregate'. You simply need to count emails per user for a period:
select userid, count(*)
from emaillog
where sendtime less than 60 minutes ago
group by...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 13, 2010 at 7:16 am
For some reason I cannot view the plan, but you are joining 12 tables (hopefully none of those are views), so any aberation in the rowcount estimation by the optimizer...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 13, 2010 at 7:13 am
Good stuff - too bad it won't actually be read by any of those who might need it. 🙁
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 13, 2010 at 7:06 am
Greg Roberts-134214 (5/12/2010)
1) I...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 12, 2010 at 8:35 am
1) I would like for you to tell me exactly why you think you need/want partitioning, and also what you think you will gain by partitioning. Most people think...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 12, 2010 at 7:58 am
I have done this evolution for numerous clients. I use sp_helpindex3 to generate the information on all indexes and then use my Mark I calibrated eyeballs and Excel to...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 11, 2010 at 7:18 am
>> WHERE NOTETYPES.Associated_Department_ID IS NULL OR OPERDEPTMBR.Operator_ID = @Operator_ID
That type of WHERE clause is HORRIBLE from a performance standpoint. Our own Gail Shaw has a very nice blog post...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 6, 2010 at 8:15 am
My statement above applies to TVFs also, at least ones that aren't inlined by the optimizer.
I will add that as a consultant in the past 3-4 years I have probably...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 6, 2010 at 8:11 am
The best plan choices would likely be made (over many iterations with many different values in the delimited string) by putting the values into a temporary table first and then...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 6, 2010 at 6:52 am
Give a qualified professional a few hours access to your system for a performance review. I think you would be surprised what would be found - and you could...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 6, 2010 at 6:50 am
Or you can simply use ApexSQL Edit, which has some very spiffy built-in source code control functionalilty - among many other features.
Disclaimer: I have a close relationship with Apex,...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 6, 2010 at 6:49 am
Hell, I just installed my first copy of SQL 2008 (NOT R2) on my laptop just two months ago!! I have never had a version of 2008 R2 on...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 5, 2010 at 2:12 pm
Paul White NZ (5/5/2010)
TheSQLGuru (5/5/2010)
Wouldn't APPLY also force a nested loop iteration over each partition and thus also be slow?
Yes to the loop join - but that's exactly what is...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 5, 2010 at 1:16 pm
Solomon Rutzky (5/5/2010)
aeternam (5/5/2010)
How would this query perform:
SELECT <something>
FROM <the partitioned table>
WHERE etp.PartitionID...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 5, 2010 at 9:51 am
Viewing 15 posts - 4,006 through 4,020 (of 5,841 total)