SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Execution plan difference when executed from Oracle VS SSMS


Execution plan difference when executed from Oracle VS SSMS

Author
Message
Ville-Pekka Vahteala
Ville-Pekka Vahteala
Mr or Mrs. 500
Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)

Group: General Forum Members
Points: 578 Visits: 3038
Hi.
We are having performance problems on our server. We have found out that execution plans (attached) are very different when query is executed from SSMS and Oracle.

Does anyone has had similar cases? Did you were able to fix it?
Attachments
PaulB-TheOneAndOnly
PaulB-TheOneAndOnly
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14317 Visits: 4639
Ville-Pekka Vahteala (1/16/2014)
Hi.
We are having performance problems on our server. We have found out that execution plans (attached) are very different when query is executed from SSMS and Oracle.

Does anyone has had similar cases? Did you were able to fix it?


Any particular reason to use SSMS to connect to Oracle?

_____________________________________
Pablo (Paul) Berzukov

Author of Understanding Database Administration available at Amazon and other bookstores.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Ville-Pekka Vahteala
Ville-Pekka Vahteala
Mr or Mrs. 500
Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)

Group: General Forum Members
Points: 578 Visits: 3038
PaulB-TheOneAndOnly (1/20/2014)
Ville-Pekka Vahteala (1/16/2014)
Hi.
We are having performance problems on our server. We have found out that execution plans (attached) are very different when query is executed from SSMS and Oracle.

Does anyone has had similar cases? Did you were able to fix it?


Any particular reason to use SSMS to connect to Oracle?


I could have written that more clearly. Query is executed from procedure in Oracle. So actually Oracle is connecting to sql server.
I had to use index hint to get execution plan work for our needs.
Matt Crowley
Matt Crowley
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1129 Visits: 469
The usual suspects in this case are the connection properties (ansi_nulls, quoted_identifiers, etc.). Have a look at the connection properties for the connection in sys.dm_exec_sessions, or via profiler.
Ville-Pekka Vahteala
Ville-Pekka Vahteala
Mr or Mrs. 500
Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)Mr or Mrs. 500 (578 reputation)

Group: General Forum Members
Points: 578 Visits: 3038
I was able to workaround the issue by forcing spatial index usage.

This problem is interesting because it was only one query which is using this dynamic cursor. All other queries from Oracle are using keyset cursor. I have seen the code and they look same on Oracle site. I was able reproduce this with sql server by setting cursor type to dynamic.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search