Re: Query Taking a Long Time
Posted in 1996
Peter Wages (pmwages@cais.cais.com) wrote: : Hi - : I have a query that is taking an inordinate amount of time. I have : allowed it to run for 8 hours without getting a result. Yes it involves : a join of two tables . One with 5.6 million records , the other table has : 2.8 million records. Working with an HP9000 T5500 box with 2 cpus. : Below is the query and the results of set explain. Any ideas? Thanks. : set explain on; : set pdqpriority high; : select loan_type_code, count(*) : from disbursements a,disburse_activity b : where booked_date != '1858/11/17' : and a.disb_id = b.disb_id : group by loan_type_code; Try loading the information into a temp-table first, then doing the count(*) on the temp-table. I've had success with this (especially when the rows returned are alot less then the original number of rows). Good luck! -Joseph