ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Where will sorting be happening when sql query will run?

user-image
تم إضافة السؤال من قبل suresh babu manukonda , Database Lead , creditsafe
تاريخ النشر: 2016/03/25
Arshad Jamil
من قبل 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.

Hradesh PATEL
من قبل Hradesh PATEL

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

mohammed السبع
من قبل mohammed السبع , chemist , health insurance

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

مستخدم محذوف‎
من قبل مستخدم محذوف‎

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

Muhammad Ahmed
من قبل 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
من قبل 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
من قبل 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 ,

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟