Database Tuning (MOSC)

MOSC Banner

Query runs for hours and hours.

edited Mar 13, 2012 10:35PM in Database Tuning (MOSC) 12 commentsAnswered
We have a query that takes hours and hours to execute.  We executed the query and it ran arround 15 hours and was still running. The query is as follows:

select  v_policy_no,V_RECEIPT_NO from remt_receipt where
v_receipt_no not  in (select distinct V_SOURCE_REF_NO from unmt_route_to_investment);

Table 'remt_receipt' contains 3876695 rows and 'unmt_route_to_investment' contains 2134921 rows.  The explain plan for the above query is as follows:

PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------------------------------
Plan hash value: 3652420855

-----------------------------------------------------------------------------------------------
| Id  | Operation                       | Name                     | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT     |                               |  3874K|    62M |  9554M  (1)   |999:59:59 |

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center