help required in Tuning this query
Hi,
The below query runs for more than 30 hrs,the query tries to fetch rows through db link
can some one help me in tuning this query,
Version :10.2.0.4
O/s: linux
Waitevent: Db file sequential read
Optimizer_mode :first _rows
select
dept,
eqtype,
COUNT (qlims_test),
qlims_test,
analyte,
mfmethod,
mrttmethod,
qmethodname,
servgrp,
frequency_type,
schedule,
needdbde
from
(
select distinct
s.id_text,
a.testcode as "NewLIMS TestCode",
q.qlims_test,
q.analyte as "Analyte Number",
a.analyte,
a.dilute,
mrtt.eqtype,
t.teststatus,
a.status as "Analyte Status",
mf.frequency_type,
mf.schedule,
mf.dept,
mf.load_type as "Individual or Batch",
0