I would say I'm a big fan of relational databases and am the first to suggest to do leave the searching, grouping and summarizing to the database with SQL instead of through code, but I will still hate your guts if you wrote SQL that cannot be indexed, sorry.