Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Where will sorting be happening when sql query will run?

user-image
Question ajoutée par suresh babu manukonda , Database Lead , creditsafe
Date de publication: 2016/03/25
Arshad Jamil
par Arshad Jamil , Freelancer , Freelancer

Sorting may be in ascending or descending order, based on Order by clause in query. the requested sorting is done on Server machine once records are fetched.

in oracle ........in sorting assending or desending in ORDER BY CLAUSE.....

mohammed السبع
par mohammed السبع , chemist , health insurance

it will be sorted in ascending order unless you change it in order by clause

Utilisateur supprimé
par Utilisateur supprimé

If Order By clause is not imposed, it automatically use the ID or Primary Key for sorting.

Muhammad Ahmed
par Muhammad Ahmed , Assistant Manager , Treet Group of Corporation Lahore

We will define it at the end of query but qurey will run from end to start.

The database table has a index cache that uses for accessing the value of any row, when we run the sql query by using the order by clause for index column then it sort asc or desc by user requirment , and also it uses the tempspace for sorting,in case no index column uses then it checks the alphabet or numbers. 

Syed Mohammad khalid Anwer
par Syed Mohammad khalid Anwer , Technical Database Administrator , Oracle India Pvt L t d (Net Connect Global)

It uses SQL Work Areas (a component of PGA) .

VENKATESH NADIPINENI
par VENKATESH NADIPINENI , Senior Project Engineer , WIPRO ARABIA LTD

When you run the SQL with order by clause it uses the index cache if we use indexed cloumn. In case there is no index on column which defined in order by clause, sorting will happen tempspace/data cache ,

More Questions Like This