This discussion is archived
1 Reply Latest reply: Aug 5, 2012 2:54 PM by John O'Toole RSS

Delay in fetching resultSet for Spatial Query for first time after DB start

949067 Newbie
Currently Being Moderated
I am not sure i fi need to post this question in the Spatial forum or this might be related to Oracle database in general. I
I am currently running a Load test of using a Java utility (spinning multiple Threads) and each thread makes a query to retrieve SDO_GEOMETRY geo-fences. In my Java Utility I am using the thin driver to connect to the oracle instance and it is residing on the same server as the database,

I noticed that when i restart the Database, there is a considerable delay in the first request to execute a spatial query
After putting more debug points , i found that the delay is just the first time the result set instance is created after an execute Query is issued on prepare statement. The delay is gone in the next try and i see there are no delays after . But I am wondering, is this delay standard?..i would think the delay would be caused in creating a connection for the first time and not creating a result set?...any body have any ideas?. i need to document the load test and need to account for this initial delay in fetching the result set for the first time.
  • 1. Re: Delay in fetching resultSet for Spatial Query for first time after DB start
    John O'Toole Journeyer
    Currently Being Moderated
    Hi Cosmopolitan,
    there is a considerable delay in the first request to execute a spatial query
    Can you quantify the delay? What are we talking about here, a few seconds?
    Can you give us the sql for the query that is being executed?
    What version of Oracle are you on?
    any body have any ideas?
    I'd suspect the delay is the JVM cranking up. Many spatial features are written in java, so they run in the JVM, which can take a while to get going after a database restart.
    i would think the delay would be caused in creating a connection for the first time and not creating a result set?
    Find the sql that is being run and try running this from SQL*Plus after a database restart. This will help diagnose the issue.

    But what does it matter if there is a delay after a database restart? A properly run database system should only be restarted for maintenance reasons. i.e. a restart every few months when you have to patch the database or operating system. So a bit of a delay every couple of months isn't really worth too much concern.

    John

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points