Query taking lot of time to execute..
I have a very complecated query which I am executing using JDBC. The query has an insert statement. This query takes 15 mins to complete. I'm running the query as stand alone java program. Can some one have some suggestions what is the best way to debug. I need to find out why the query is taking that long. I'm using oracle 10g with sql developer.
ps = con.prepareStatement(query);
timeStart = System.currentTimeMillis();
timeEnd = System.currentTimeMillis();
System.out.println("Time Taken::"+(timeStart -timeEnd)+" ms");
Thanks in advance