Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3307768
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:26:40+00:00 2026-05-17T21:26:40+00:00

We use ODP.NET to perform queries on Oracle databases, and normally it works fine.

  • 0

We use ODP.NET to perform queries on Oracle databases, and normally it works fine. There is a particular database, and a particular view in that database, though, that we just can’t complete a query on from .NET. For example:

SELECT some_varchar_field FROM the_view WHERE ROWNUM < 5;

If I execute this query from within Oracle SQL developer, it finishes in less than a second. If I do an identical query from our .NET application using ODP.NET, it hangs and eventually produces an “ORA-03135: connection lost contact” error. I think that limiting it to just a few rows eliminates the possibility that it is as FetchSize issue.

There are other queries I can execute successfully, but they are slower from our program than from SQL Developer. Again, I realize SQL Developer only gets data for the first 50 rows initially, but I think the ROWNUM condition takes that out of the equation.

What might be different about the connection or command that Oracle SQL Developer is using vs the one our application is using that would cause a difference in speed?

Unfortunately, I do not have access to the server (other than to run Oracle queries against it).

Thank you.

UPDATE: I have tried the same query with Microsoft’s Oracle provider and it executes very quickly. Unfortunately, that provider is deprecated so this is not a long term solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:26:41+00:00Added an answer on May 17, 2026 at 9:26 pm

    It had nothing to do with the ODP.NET provider. The problem was that the library we use to create connections for us (which, of course, is not used by Oracle SQL Developer, and which I did not use when I tried the Microsoft provider) was always executing the following statements before doing anything:

    ALTER SESSION SET NLS_COMP = LINGUISTIC
    ALTER SESSION SET NLS_SORT = BINARY_CI
    

    These make Oracle case-insensitive. But, they also render all conventional indexes useless. Because we were querying from a View, it had ordering built in. And because we don’t own the database, we can’t make the indexes linguistic to fix the performance problem.

    Providing a way to not execute those statements in this (rare) scenario fixed the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use ODP.NET to run various queries on an oracle database and
I'm trying to use the Oracle ODP.NET 11g (11.1.0.6.20) Instant Client on my ASP.net
ODP.NET 11.2.0.3.0 was released on December 28, 2011 and its description says that it
I'm using the current version of ODP.NET and trying to connect to an Oracle
I want to use Oracle XE DB in my ASP.NET MVC project. I installed
I use ODP.NET and version 4.1 of the Enterprise Library, vs 2008. And all
I've installed ODP.NET and am using the session state service through Oracle for an
I am using ADO.Net for connecting to some Sql Server and Oracle databases, and
Currently i am using ODP.Net.Is Oracle Instant client something to replace this or an
I am trying to make the default ASP.NET MVC application use a remote Oracle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.