title: Oracle Datareader in .Net - way too slow (over network)
body: <p>Before I get the "have you tried ODP.net?" answers, yes I have and am using it now. </p>
  
  <p>I'm moving data from oracle to sql server (not important) and am using a datareader on the oracle connection. Larger tables are CRAWLING. Sometimes as bad as 10 records per second. When I noticed the performance issues, I reduced my source code down to just doing simple Reader.Read() calls over the whole table, so nothing else is slowing it. I've tried both the MS and the Oracle ODP .net clients. I'm currently using the 11g Instant Client, 64bit on win7 64bit, 8 gigs ram and all the goodies. I've used it on the local network, and am currently ona  VPN and the performance is basically the same. I've tuned the Prefetch sizes with no results. </p>
  
  <p>I can run the Export Data function in the Oracle Sql DEveloper tools, and export all the data for the entire database, on this same machine, over the same network, at about 100 times the speed. </p>
  
  <p>I can copy my .net app to the oracle server and run the same performance test on it, and it finishes in less than a second. </p>
  
  <p>So, it's not the network itself being slow and it's not the quantity of data (as demonstrated by SqlDeveloper export), and it's not the .net code itself nor is it the oracle db (as demonstrated by running it on the server), so it has to be some combination of Datareader used over any network. </p>
  
  <p>Is it my instant client install? Does the full blown client perform better? 64 bit client messing things up? Really at a loss. </p>
  
  <p>UPDATE: </p>
  
  <p>I've since run the same app, compiled for 32 bit, and run on a virtual pc instance of windows xp which has the "full" oracle client installed (32 bit version, obviously). Even with the reduced performance of a VM, it still ran almost 10 times faster. So, definitely some sort of problem with the Instant client, and my guess specifically the 64 bit Instant Client. The last test to confirm this would be to install a 32 bit instant client on this same machine and run it again. If i can find the time...</p>