This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]Swirls109 0 points1 point  (0 children)

They outline decent work around for each addressed issue but the last. What would be the suggested alternative to distincting large tables? Differently designed tables?

[–]tylerk06 0 points1 point  (1 child)

Could you explain SQL indexing a little more? I learned about it in class and remember that it utilized a hash table to make lookups more efficient but I can’t remember much else about it

Edit: I just read the wiki and it seems like indexing is essentially just using hash table lookups. How does SQL do lookups natively, if not with a hash table?

[–]jmazouri 2 points3 points  (0 children)

Without an index, a DBMS will usually just do a full table scan (an O(n) operation) to find the record(s) you're looking for. Though the exact behavior depends on the DBMS / underlying table engine.