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:16

>>2
print
Seriously?

And if your table has 200M rows, but your result set only has 5 rows, you're okay with it searching the whole thing?

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