Sergei,
How many records in each table? What indexes are in these tables? What version of Oracle?
What do you mean by 'began to hang'?
I'd try making the attempts in the WHERE clause into a Between. I'd also try grouping by f.subsite_id.
You could always throw a Rule hint at it and see what happens.
Jerry Whittle
ACIFICS DBA
NCI Information Systems Inc.
[EMAIL PROTECTED]
618-622-4145
-----Original Message-----
From: Sergei [SMTP:[EMAIL PROTECTED]]
Hello everybody,
I have the following query that runs every week.
UPDATE tmp_brian_metareward1 tmp
SET offers_seen = (SELECT count(f.fastcash_id) FROM
metareward.fastcash f
WHERE f.subsite_id = tmp.subsite_id
and attempt >= trunc(sysdate-1)
and attempt < trunc(sysdate)
group by tmp.subsite_id);
This week it began to hang and I can't figure out why. No changes were
made to a database. Please advise me on how I can tune it, which hints
to add, or anything else I can do.
Thank you
Sergei