Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: can i execute this sql ?
You query is really the following:
select
e.state_name, fwm.job_type, fc.fit_ind, count (*)
from EMPLOYER_MASTER e,
FOREIGN_WORKER_MASTER fwm,
FW_CERTIFIED_DETAILS fc
where fwm.employer_code = e.employer_code and
fc.worker_code = fwm.worker_code
group by e.state_name, fwm.job_type, fc.fit_ind
The best way is to do an EXPLAIN... maybe there are not enough indexes, etc..
One thing, you can say COUNT(1) or COUNT(e.state_name) which will be faster than COUNT(*)...
Another way is to start with a simple query, and do timings... then build up the query slowly.. and see where the time gets long...
Good Luck
Robert Proffitt
In article <7v8v4c$cpd$1_at_nnrp1.deja.com>,
newnewbie_at_my-deja.com wrote:
> String str1= "select e.state_name, fwm.job_type, fc.fit_ind, count
> (*) from EMPLOYER_MASTER e, " +
> " FOREIGN_WORKER_MASTER fwm, FW_CERTIFIED_DETAILS fc "+
> " where fwm.employer_code = e.employer_code and " +
> " fc.worker_code = fwm.worker_code group by e.state_name,
> fwm.job_type, fc.fit_ind " ;
>
> the code for my sql is as above.
>
> can i execute it ?
>
> when i try, the program just hangs. perhaps there is too many records
?
>
> thanks, bye.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Oct 28 1999 - 12:47:31 CDT