Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle-l »

RE: Oracle - MS Access - Does your company have a policy about
 local vs. centralized data storage? (

Norman Dunbar

2007-07-05



We have Access databases using ling tables to connect to individual
Oracle databases using ODBC.

I loathe and detest Access databases doing this - in my (not so) humble
opinion, Access should stop pretending to be a proper database and stick
to one user on one PC and stay off the network. ODBC is an abomination
too - especially if you have to write programs that use it - I'd rather
do OCI.

My problems with Access is the following :

* the Oracle table has a LONG in it.

* Oracle will prevent you using 'INSTR', 'SUBSTR' etc on LONGs.

* Access will let you write and execute a query that searches the LONG
column for specific data - this would be prevented by Oracle by Access
knows better - yeah right.

* Access rewrites the query (unless set up as a pass through) to fetch
all the rows from said table containing LONG and converts to one of it's
own TEXT types whihc it can search. So, as far as Access is concerned,
it can search within a LONG column.

* BUT ...

* To do this, Access drop all the join criteria on that table.

* So, if you are selecting from a single table, fine, start adding
joins in and suddenly you have cartesian joins galore. Check the explain
plan below (Hopefully the formatting won't be too bad when you read it,
apologies in advance if it is).


SELECT STATEMENT CHOOSE Cost: 437,487,529,649,273 Bytes: 43
Cardinality: 1            
19 SORT GROUP BY Cost: 437,487,529,649,273 Bytes: 43 Cardinality: 1
             
18 MERGE JOIN CARTESIAN Cost: 4,378,297,989,168 Bytes:
731,784,448,796,610,048 Cardinality: 17,018,242,995,270,000  
15 MERGE JOIN CARTESIAN Cost: 614,903,568 Bytes: 94,120,186,340,400
Cardinality: 2,188,841,542,800      
12 MERGE JOIN CARTESIAN Cost: 60,438 Bytes: 5,287,650,918
Cardinality: 122,968,626          
9 NESTED LOOPS Cost: 26 Bytes: 1,298,858 Cardinality: 30,206
       
7 HASH JOIN Cost: 26 Bytes: 1,424,000 Cardinality: 35,600
     
1 TABLE ACCESS FULL XXXXXX.RESPONSIBILITIES Cost: 4 Bytes: 70,364
Cardinality: 10,052    
6 MERGE JOIN CARTESIAN Cost: 13 Bytes: 1,174,800 Cardinality:
35,600    
3 TABLE ACCESS BY INDEX ROWID XXXXXX.AGREEMENTS Cost: 3 Bytes: 58
Cardinality: 2  
2 INDEX RANGE SCAN UNIQUE XXXXXX.AGR_PK Cost: 2 Cardinality: 2
5 SORT JOIN Cost: 10 Bytes: 71,200 Cardinality: 17,800  
4 TABLE ACCESS FULL XXXXXX.HOLDERS Cost: 5 Bytes: 71,200
Cardinality: 17,800
8 INDEX UNIQUE SCAN UNIQUE XXXXXX.ORG_PRIME Bytes: 23,325
Cardinality: 7,775      
11 SORT JOIN Cost: 60,438 Cardinality: 4,071
       
10 INDEX FAST FULL SCAN UNIQUE XXXXXX.P_PRIME Cost: 2 Cardinality:
4,071      
14 SORT JOIN Cost: 614,903,566 Cardinality: 17,800
         
13 TABLE ACCESS FULL XXXXXX.HOLDERS Cost: 5 Cardinality: 17,800
       
17 SORT JOIN Cost: 437,487,529,649,268 Cardinality: 7,775
           
16 INDEX FAST FULL SCAN UNIQUE XXXXXX.ORG_PRIME Cost: 2 Cardinality:
7,775          

Access and Oracle - just say "No" !


Cheers,
Norman.

Norman Dunbar.
Contract Oracle DBA.
Rivers House, Leeds.

Internal : 7 28 2051
External : 0113 231 2051


Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.

We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
--
http://www.freelists.org/webpage/oracle-l


©2008 dba.5341.com - Jax Systems, LLC, U.S.A.