June 23, 2011 at 5:55 am
hi,
we have a long running query(for 10-15 mins). Sql text for that session is "FETCH API_CURSOR0000000000000212" ,"FETCH API_CURSOR0000000000000213" what does that mean. the waittype event is pageiolatch_sh.
this happens when querying a specific period of data. need help pls.
Regards,
MShenel
June 23, 2011 at 6:01 am
Is this just 1 query or a series of queries in a loop (most likely client side)?
June 23, 2011 at 6:09 am
Is this Dynamics AX by any chance?
June 23, 2011 at 6:17 am
anthony.green (6/23/2011)
Is this Dynamics AX by any chance?
... I see the same kind of things with Dynamics Nav. Nice application to code in... not the fastest to run queries tho.
June 23, 2011 at 6:20 am
Yeah its nasty, from what I have heard about the whole Dynamics range, is that it was purchased off a company that was developing the suite for Oracle, obivously Oracle handle's cursors like a dream but SQL isnt so good and MS havn't change the sorce code.
Not sure how much of that is true, just what I have been told from various sources.
June 23, 2011 at 6:24 am
anthony.green (6/23/2011)
Yeah its nasty, from what I have heard about the whole Dynamics range, is that it was purchased off a company that was developing the suite for Oracle, obivously Oracle handle's cursors like a dream but SQL isnt so good and MS havn't change the sorce code.Not sure how much of that is true, just what I have been told from various sources.
I can confirm the RBAR hell part.
I've recoded Nav reports in SSRS and they run up to 1000 times faster while doing more works (joins, columns and groupings).
June 23, 2011 at 7:57 am
it is a single query from a third party application.for different dates a can see the full query and completes in 5 secs.
Regards,
MShenel
June 23, 2011 at 8:03 am
So the single query sometimes take 5 seconds and sometimes 15 minutes?
Are the stats up to date? When was the last stats update and what type of date is being filtered? >> When the date field is being filled is it mostly being filled with GETDATE() or today's date?
June 23, 2011 at 8:56 am
stats seems to be stale. auto stats wasnot ON for that table. gathering index solved our case. thank you
Regards,
MShenel
June 23, 2011 at 9:06 am
I don't have all the info I asked for but this is where I was going with this >>>
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply