
|
[oracle-l]
||
[Date Prev]
[12-2006 Date Index]
[Date Next]
||
[Thread Prev]
[12-2006 Thread Index]
[Thread Next]
Strage SQL query behaviour
- From: MVR <yoursraju007@xxxxxxxxx>
- To: oracle-l <oracle-l@xxxxxxxxxxxxx>
- Date: Fri, 1 Dec 2006 11:57:27 -0500
Environment: 9.2.0.4, Linux x86.
Query 1:
SELECT DISTINCT A , B , C ,D from
T1@L1,
T1@L1,
T1@L3
where
blah..blah..blah...
This query returns say around 500 rows(less than 1 second time).
Please note that all tables are REMOTE over DB Link.
The following insert statement inserted 14 million rows(around 2
hours), select is same as above:
Query2:
insert into table1 SELECT DISTINCT A , B , C ,D from
T1@L1,
T1@L1,
T1@L3
where
blah..blah..blah...
The following table is also created with 14 million rows:
Query3:
create table table2 as SELECT DISTINCT A , B , C ,D from
T1@L1,
T1@L1,
T1@L3
where
blah..blah..blah...
The following query count show 14 millon rows:
Query3:
select count(1) from (SELECT DISTINCT A , B , C ,D from
T1@L1,
T1@L1,
T1@L3
where
blah..blah..blah...)
SELECT query is the same in all above queries.. Im not able to
understand whats going wrong here, when its used as a sub query.
Has anyone seen these kind of wierd things?
Thanks,
MVR
--
http://www.freelists.org/webpage/oracle-l
|

|