Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: poorly written query?

Re: poorly written query?

From: David Busby <dbusby3_at_slb.com>
Date: Fri, 30 Mar 2001 15:18:24 -0600
Message-ID: <3AC4F820.EF9095A@slb.com>

Looks like you might have a cartesian join. I don't see a link between the ollectr.del_acct table and the collectr.acct_contact table.

Sk8er wrote:

> I am trying to run this particular query.................
>
> select collector_id assessor, count(collector_id) num_assmnts,
> count(hotlined_yn) num_hotlines, count(pass_move_yn) num_pins,
> count(suspend_yn) num_suspnds, sum(payment_recvd) pay_recvd,
> count(payment_recvd) num_pays, sum(arts_amt) arts, count(arts_amt)
> arts_total from ollectr.del_acct, collectr.acct_contact where
> rep_review_date< sysdate and rep_review_date>= sysdate- 2 group by
> collector_id;
>
> ..............via sql*plus on an Oracle 8.0.5 database from
> a read only table. The sums add up more than just yesterday's date and it
> takes forever to process. Could someone please give me some advice as to
> what I might be doing wrong? Any help would be much appreciated!
Received on Fri Mar 30 2001 - 15:18:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US