Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Database Query Search

Name: Anonymous 2011-10-09 1:14

Hello, I would highly appreciate some help with this

Consider this query:
Select * from Employee where salary>10000 sort by salary desc;

How is it actually implemented by the database? If the records are all stored in some sort of a binary search tree, sorted by their index (say the primary key), it's going to be incredibly hard to search and sort the results by salary.

Name: Anonymous 2011-10-09 3:27

>>4

It takes linear time to print (take the data thingys you are interested in, and copy them over to the other place thingy that stores stuff you are going use and stuff) out the result of th query, so it should alright if radix sort is used to sort the results in linear time.

It would only need to sort the entries that were selected.

>>3

Thank you data friend.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List