November 5, 2007 at 8:28 am
I have a problem with a query that once executes just fine - good timing (exec plans that use proper indexes) but in some cases, it runs slow due to FTS. Same query, just different Id that I pull the info by. The query is not complex at all:
Select 1,2,3 from table a inner join table b on ... (indexed fields) inner join table c on (indexed fields) where index and look up fields by the same indexes on the join.
The trace just showed FTS and not using the index, but it doesn't give me clue why it is doing it. I did check that this is not data dependant (like if for the slow ID I pull half of the table) - this is not the case. All stats are up-to-date.
How can I approach this issue and to get to the reason for it?
Thanks a lot,
Mj
November 5, 2007 at 8:48 am
Hi, Have you tried updating the statistics on the tables you are querying?
Pete
Peter Gadsby
Business Intelligence Consultant
www.hgconsult.co.uk
November 5, 2007 at 9:13 am
Yes, I did but nothing really changed.
I used this command to do it:
UPDATE STATISTICS er_account WITH FULLSCAN, NORECOMPUTE
Thanks,
mj
November 5, 2007 at 9:18 am
Can you post the actual queries? Doesn't sound like you missed anything, but I'd like to see them. Also, if you check the data, what is the selectivity for the two ids?
November 5, 2007 at 9:27 am
Have connectivity issues right now.
I'll post the queries as soon as I could connect to the box.
Sorry about that.
mj
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply