Forum Stats

  • 3,876,074 Users
  • 2,267,056 Discussions



user3342888 Member Posts: 1 Blue Ribbon

Hi, we face an issue with very slow performance for the first connexion to our database!! ( 3000ms) whereas next ones are fast ( 30ms)

Can you have some explanations for that issue?

Thanks a lot


  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 3,154 Employee

    3 seconds is slow. Part of the problem could be due to the creation of the connection pool and populating it initially with connections.

    You can try turning pooling off to see if the first connection improves. Of course, it's unlikely you subsequent connections will be in the 30 ms range.

    Most apps will "warm" up the pool with an initial connection so that the first user doesn't take the performance hit.

    You will also see slower performance if the middle-tier and DB are on different clouds/datacenters. Most customers solve that by using a direct interconnect.

    That's not to say there may not be other issues, such as if the first address in your TNS entry is not responding and ODP.NET has to try the second one.

    You can turn on ODP.NET tracing to see where the time is being spent. The trace has timestamps to help you distinguish how long each internal operation is taking.