What is the difference in using SQL directly and calling SQL from PEOPLECODE in Application Engine?

If you use SQL directly then it will go to database directly to fetch rows of data. But if you write SQL'S in PEOPLECODE, den the trip will be from application server to database because PEOPLECODE resides in application server. 

One should avoid writing SQL'S in App engine PEOPLECODE as it would degrade the performance.