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 9132665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:21:03+00:00 2026-06-17T08:21:03+00:00

I have an Oracle database that I connect to over a somewhat slow network

  • 0

I have an Oracle database that I connect to over a somewhat slow network link. In there, I have a simple table, similar to this one:

create table EMPLOYEES (
    employee_id INTEGER PRIMARY KEY,
    first_name VARCHAR2(4000)
);

And I’m using a rather boring query to retrieve all rows from it:

select employee_id, first_name from EMPLOYEES

So far so good. However, I’d noticed that when I ask Toad to export all rows resulting from that query, it takes about 4 seconds. In my .NET application, it takes 130 seconds. After quite a bit of hacking, I’ve noticed that the longest value in the FIRST_NAME column is 50 characters long, so I’ve altered my query as follows:

select employee_id, substr(first_name, 1, 50) from EMPLOYEES

Now, it is very fast in both Toad and my C#/.NET program. I have tried this using both Microsoft’s and Oracle’s data provider libraries, with the same result.

What is going on here ? Is Oracle — as I suspect — really sending 4000 bytes for each row, leaving it up to the client to cut them down to the right length ? What’s the point of “var” in “varchar”, then ? Also, how is Toad getting around this problem, and how can I do the same thing ?

  • 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-06-17T08:21:04+00:00Added an answer on June 17, 2026 at 8:21 am

    No, Oracle is not sending 4,000 bytes. Let’s assume you really are spooling all records in Toad. All Toad is doing is fetching the records and printing them to the grid on your screen? What is your code doing? The SQL could be running in the same time, but your code is doing some other processing that is adding the time.

    To really know what is going on, you need to do one or two things.

    First, do a SQLNet client trace. If that doesn’t provide the answer, you need to do a server trace for you session.

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

Sidebar

Related Questions

I have an oracle 10g database that has 2 tables: a REBATES table, and
I have a table in an Oracle Database that has, among others, a DATE
I have a simple web service that uses an oracle database. When I test
We have a fairly large Oracle database that we are able to connect via
I have a library that contains functionality to connect to on oracle database. When
I have two small VB.NET applications that connect to the same Oracle database. One
I have a JRuby project that connects to an Oracle database using JDBC via
I have some Java code that connects to an Oracle database using DriverManager.getConnection(). It
I have an Oracle database that I am connecting to with PHP OCI8. One
We have an Oracle database here that's been around for about 10 years. It's

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.