Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slow ODBC-Connection to C#.NET 1

Status
Not open for further replies.

nos4a2

Programmer
Mar 11, 2008
3
AT
Hi,

I just started working with Oracle and already have a problem:

I wrote a C#-form which includes a DataGrid, where I want to display a table from Oracle 10g. It has about 40.000 lines and 20 columns (just simple numbers and strings).

I tried to fill this datagrid, connecting with "Microsoft ODBC for Oracle", but filling takes more than ONE minute. Client and Server have nearly no CPU activity and network traffic of about 500kbit/sec.

Displaying the same table in Oracle SQL-Developer, it takes just 2 seconds with about 15Mbit/sec.

Anyone got an idea what the problem is?
I already tried the Oracle ODBC-driver but this one is very slow too. Is ODBC the problem?
How does SQL-Developer work?

Thanks in advance.
 
I haven't used ODBC for many years but I remember that some parameters (don't remember their exact names) may affect the performance significantly, especially those controlling bulk operations.

BTW, do you really need all that 40000 rows to be fetched in one shot? And are you sure that SQL-Developer really gets them?

Regards, Dima
 
Problem is, there are just a few parameters. Like buffer or something. But increasing this buffer to 10 times of the size doesn't make any difference.

Gathering all these rows at once is important because the user wants to sort this list, change the order of the columns and then export it to excel. So paging is not possible.

SQL-Developer loads the whole table when I press Ctrl+End to go to the last line of the table. And is about 30times faster.
 
Buffer is not the only parameter to set, you may also try to change the number of rows to prefetch, not sure whether on a connection or a recordset level.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top