@techreport{R-92-24, TITLE = {Main Memory Oriented Optimization of OO Queries using Typed Datalog with Foreign Predicates}, AUTHOR = {Witold Litwin and Tore Risch}, YEAR = {1992}, NUMBER = {R-92-24}, INSTITUTION = ida, ADDRESS = idaaddr, ABSTRACTURL = {/publications/cgi-bin/tr-fetch.pl?r-92-24+abstr}, ABSTRACT = {Object-oriented DBMSs (OODBs) have created a demand for relationally complete, extensible, and declarative object-oriented (OO) query languages. Until now, run time performance of such languages was far behind that of procedural OO interfaces. One reason is the internal use of a relational engine with magnetic disk resident databases. We address the processing of the declarative OO language WS-OSQL, provided by the fully operational prototype OODB called WS-IRIS. A WS-IRIS database is MM resident. The system architecture, data structures, and optimization techniques are designed accordingly. WS-OSQL queries are compiled into an OO extension of Datalog called ObjectLog, providing for objects, typing, overloading, and foreign predicates for extensibility. We present cost based optimizations in WS-IRIS using ObjectLog. Performance tests show that WS-IRIS is about as fast as current OODBs with procedural interfaces only and is much faster than known relationally complete systems. These results would not be possible for a traditional disk based implementation. However, MM residency of a database appears only a necessary condition for better performance. An efficient optimization proves of crucial importance as well.}, IDANR = {LiTH-IDA-R-92-24}, NOTE = {Accepted for publication in IEEE Transactions on Knowledge and Data Engineering and accepted to IEEE Transactions on Knowledge and Data Engineering in a special section on main memory databases}