|
Let
me clearfy. I am running Oracle 8.1.6 on solaris 8 Fastcash has 50M
record tmp_brian_metareward1 has 600
records. I was able to tune the query so it runs fast now. I created a combined index on subsite_id
and attempt and I added a hint UPDATE tmp_brian_metareward1 tmp SET offers_seen = ( SELECT
/*+ INDEX(f IN_FASTCASH_SIDATMP) */ 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); I am still having a problem with a similar query below: IN_FASTCASH_SIDFIDVER – index is for subsite_id fastcash_id and
verified UPDATE tmp_brian_metareward1 tmp SET
revenue = (SELECT /*+ INDEX(f IN_FASTCASH_SIDFIDVER)
*/ sum(f.mr_amount)/100 FROM metareward.fastcash
f, metareward.transaction_fastcash tf
WHERE f.subsite_id = tmp.subsite_id
and f.fastcash_id = tf.fastcash_id
and f.verified >= trunc(sysdate-1) and f.verified < trunc(sysdate)
group by tmp.subsite_id); transaction_fastcash table has
2.5M records fastcash table has
50M record Thank you Sergei -----Original Message----- 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 -----Original Message----- Hello everybody, I have the following query that runs every
week. UPDATE tmp_brian_metareward1 tmp This week it began to hang and I can't figure out
why. No changes were Thank you |
Title: RE: SQL tuning help
- RE: Sql Tuning help Dasko, Dan
- RE: Sql Tuning help Toepke, Kevin M
- RE: Sql Tuning help Chuck Hamilton
- RE: Sql Tuning help Cale, Rick T (Richard)
- Re: Sql Tuning help Tim Sawmiller
- SQL tuning help Sergei
- RE: SQL tuning help Whittle Jerome Contr NCI
- Re: SQL tuning help Arup Nanda
- Re: SQL tuning help Krishna Rao Kakatur
- Re: SQL tuning help Mark Richard
- RE: SQL tuning help Sergei
- RE: SQL tuning help Stephen Lee
- Re: SQL tuning help Sathyanaryanan_K/VGIL
- sql tuning help Rick_Cale
- Re: sql tuning help Mark J. Bobak
- RE: sql tuning help Robson, Peter
- Re: sql tuning help Rick_Cale
- RE: sql tuning help Jamadagni, Rajendra
- RE: sql tuning help Khedr, Waleed
- RE: sql tuning help Mercadante, Thomas F
- RE: sql tuning help Koivu, Lisa
