What is the Best way to write lingq for loop queries

Hi Guys,

I am pretty new to Oracle Database, just recently completed Oracle Exadata Training at Mindmajix.com. My question is, what is the Best way to write lingq for loop queries?

I am using oracleDB and i have view like below which contains employees and his managers.
I need to select a person and all of his staff. IE
When i login with the user of Person1, I need to get all of the persons above.
Here is my LINQ but it is too slow… What is the efficient way to get the data ?

Maybe this SQL query helps you a bit:

select person.FIRSTNAME, person.LASTNAME, chef.FIRSTNAME, chef.LASTNAME from EMPLOYEES person, EMPLOYEES chef where person.MNGER=chef.EMPNO;

1 Like

Better Idea could be filter first by the common conditions, later group by barcode and then keep those groups who have an element that meets the second where conditions