POV-Ray : Newsgroups : povray.off-topic : Aren't complexity classes fun? : Re: Aren't complexity classes fun? Server Time
7 Sep 2024 05:12:02 EDT (-0400)
  Re: Aren't complexity classes fun?  
From: Invisible
Date: 31 Jul 2008 04:10:09
Message: <48917361$1@news.povray.org>
>> So one way takes almost three hours to do a single lookup, while the
>> other can do 40 lookups per second. O(log N) FTW!
> 
> Which is why we really, really like indexes on database tables.

To quote Team America, "**** YEAH!"

Although - and not many people seem to understand this part - indexes 
make looking up *one* element much faster (if you index the right 
thing). However, if you're doing to end up needing to process a large 
percentage of the table anyway, it's actually faster to *not use* any 
indexes there might be.

This is why we have complex database engines with sophisticated 
algorithms which attempt to pick the best method for performing each 
query. Yet still it seems that certain people think that the task of 
"tuning" an SQL query means working out which combination of optimiser 
hints cause the database to always use indexes for that query. *sigh*

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.