Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Alternate to group by clause

396862Feb 12 2009 — edited Feb 17 2009
Hi
I am using Oracle 8i and one of my queries is getting the data from multiple sources through a dblink from other databases (customer need cannot avoid dblinks).

The query is using the group by clause to get the count based on specific columns and when i am not using the group by the query is pretty fast.

select count(id), col1,col2,col3
from source1@dblink1,
source2@dblink1,
source3@dblink1,
source4@dblink1,
source5@dblink1
where
...
group by col1,col2,col3

Please suggest the use of other Oracle features that we can use (pl/sql table or looping in pl/sql instead of using group by ) as the amount of data is large and it has to go through several iterations and accordingly update my local db with the counts returned.

An example will be quite helpful.

Thanks in Advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2009
Added on Feb 12 2009
5 comments
1,735 views