Viewing 15 posts - 1 through 15 (of 22 total)
Most notable quote: "And screw the boss... it's not his/her hiney"
December 29, 2009 at 4:27 pm
Jeff, I have to disagree please see the example below:
Your reebar example does not include the filter nid = nid. Also note, on smaller queries the optimizer will pull all...
December 28, 2009 at 10:59 am
Try LastNonEmpty and such. What are you using the non-additive measure for?
December 24, 2009 at 3:57 pm
Dugi (12/24/2009)
I agree with you ... if you SELECT NAME FROM T-SQL_MASTERS WHERE NAME LIKE 'J%' you will retrieve the only result Jeff Moden.
Let's not forget Jamie Thomson http://sqlblog.com/blogs/jamie_thomson/
December 24, 2009 at 2:50 pm
I don't know what you're asking, but try the PIVOT command. If the rows you want to convert to columns are dynamic you may need to execute a dynamic sql...
December 24, 2009 at 2:17 pm
insert the records you want to save into a temporary table, drop and recreate the table in question, then insert the records from the temporary table into the newly created...
December 24, 2009 at 2:09 pm
Ok so we are back to indexes being the likely cause issue. IMO it sounds like a page split. Make sure the fillfactor and pad_index are not set too high....
December 24, 2009 at 10:48 am
The question was not clear by any means. Additionally, the second example does not have a logical relationship that holds true for Start Date, End Date and TotalDays.
December 24, 2009 at 9:51 am
That sounds like a good explanation and would likely have a much greater impact on the insert performance.
December 24, 2009 at 9:35 am
declare @start_date datetime
declare @end_date datetime
declare @diff int
set @start_date = '3/9/2009'
set @end_date = '3/13/2009'
set @diff = datediff(dd,@start_date,@end_date)
create table #Results ([Month Start] datetime, [Month End] datetime, [Total Days] int, [Amount] money)
insert into...
December 24, 2009 at 1:47 am
you can find what indexes are on the table by using sp_helpindex 'tablename'
If indexes are the issue you can use profiler to monitor queries to the table and drop indexes...
December 24, 2009 at 1:27 am
try an index defrag.
Also when you do your simple queries do the following:
check the db for locks (sp_who)
include appropriate filters on argable fields
return limited results
select top 1 id from table...
December 23, 2009 at 6:46 pm
Some people don't know how to write queries, or use there limited knowledge to complete a task (likely cause in this scenario).
I like to look at CTE's at temporary views....
December 23, 2009 at 6:39 pm
Viewing 15 posts - 1 through 15 (of 22 total)