Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Inner Join Vs Database view Vs for all entries

Hi I know how to use and create inner join ( outer join) ,databse view and for all entries ....

I want to know since all of these three are used for the same purpose...which one is better....

and projection view ( why do we really create it ) ...is it faster ..because no correpsoding table or view is created in databe for the projection view ...then why do we really create it ...is it more optimized ???

Once database view is created then does the data in databse view is selected suring the select query ie at thr runtime or data is permanently stored in int in database....as far as i know .....data is selected at runtime in databse view..then why to create database view..instead I can use for all entries .........beacuse though using databse view we have one select query and using for all entries we have 2 select queries but internally when data is selected form a databse view.....database has to trigger two select queries....

In nutsheel i wan to understand the functionality ( efficcincy wise and how it works in background

) for all these three

replied

>

> Hi I know how to use and create inner join ( outer join) ,databse view and for all entries ....

> I want to know since all of these three are used for the same purpose...which one is better....

Neither of them is always evil nor always good. It depends.

FAE and Joins there are discussed here:

You will find some useful information (SAP Notes) where you can find how FAE is implemented by SAP and

you can decide for yourself when to use and wich common pitfalls you can step into.

> and projection view ( why do we really create it ) ...is it faster ..because no correpsoding table or view is created in databe for the projection view ...then why do we really create it ...is it more optimized ???

it's a common definition of queries that you can put aside and can be used by different developers

with a well known interface. It makes your live a little bit easier and hides some complex querie constructs from the developer. So it has nothing to do with optimization - only your query definition and underlying data model dictates the optimization.

> Once database view is created then does the data in databse view is selected suring the select query ie at thr runtime or data is permanently stored in int in database....as far as i know .....data is selected at runtime in databse view..

right

then why to create database view..instead I can use for all entries .........beacuse though using databse view we have one select query and using for all entries we have 2 select queries but internally when data is selected form a databse view.....database has to trigger two select queries....

If you are talking about joins wrapped by a view: Databases are much smarter than you think.There

is a piece of software called the Optimizer who generates execution plans for queries.

More than often you "scan" twice or more in FAE while using only one join query you have only one "scan" by the database. "Scan" can mean full table or index, index lookups, sort-merge / hash/ nested loops joins

(depends on database vendor).

> In nutsheel i wan to understand the functionality ( efficcincy wise and how it works in background

> ) for all these three

You might consider reading some books about these topics because using them efficiently

assumes that you have a good basic knowledge. Knowledge in a nutshell will not help you to survive in big data volumes or high transaction environments

You will find a lot here in SDN .

bye

yk

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question