Viewing 15 posts - 2,011 through 2,025 (of 2,463 total)
Always post table defintion , index definition and sql code to get response faster
and also spend some time with the link For Quick Result in my signature.
March 26, 2010 at 7:04 am
i guess you have stored proc which creating problem if yes then u can ignore it's above part
like
create proc sp_name ( id int , parma varchar(300))as
and use remaining...
March 26, 2010 at 7:02 am
Grant Fritchey (3/26/2010)
You do know, as that table scales, this query will become slower and slower.
Frankly tell you this would be a intermediate/ working table ( prefebly a temp...
March 26, 2010 at 6:55 am
This can help you select serverproperty ('productlevel')
March 26, 2010 at 5:10 am
Refer this link alsohttp://technet.microsoft.com/en-us/library/ms189858.aspx
March 26, 2010 at 5:06 am
Rebuilding Indexes
Rebuilding an index drops and re-creates the index. This removes fragmentation, reclaims disk space by compacting the pages based on the specified or existing fill factor setting, and reorders...
March 26, 2010 at 5:05 am
Interesting
Rob Schripsema (3/25/2010)
If you're talking about a non-clustered index, I think I would drop the index after truncating the table, then import the new data, then re-create the index.
...
March 26, 2010 at 12:24 am
i am sure you must be aware of below text but i am just giving you bit support
Query to Identify Indexes that are not being used use dbname
go
SELECT o.name Object_Name,
...
March 26, 2010 at 12:13 am
Paul White NZ (3/25/2010)
What do you mean here? Having an index prevents a seek???
I guess optimizer will not use seek for HAVING MIN(Date).What do you think ?
March 25, 2010 at 11:46 pm
karthikeyan-444867 (3/25/2010)
Actually the table has more than 100000 records. So if i execute query likeselect Assetid,min(date)
from t1
group by assetid
having min(date) <> inceptiondate
it is taking 1 minutes.
if you have index on...
March 25, 2010 at 6:46 am
select assetid,date
from
(
select assetid,date, row_number () over (partition by assetid order by date ) rowid from t1
WHERE date < inceptiondate ) t
WHERE t.rowid = 1
March 25, 2010 at 6:43 am
March 25, 2010 at 6:37 am
after seeing Execution plan, i should say CTE query working better the PIVOT one.
March 25, 2010 at 6:22 am
try this select TransactionID,
sum(TOT) as TOT,
sum(UniqueEnvs) as UniqueEnvs,
sum(GBX) as GBX,
sum(IEX) as IEX,
sum(UNK) as UNX,
DateTimeReceived
...
March 25, 2010 at 6:11 am
Viewing 15 posts - 2,011 through 2,025 (of 2,463 total)