by far the largest - joins and subqueries actually optimize correctly on Postgresql. In mysql, if you say (pseduosql) "select a_few_rows_from (select many_many_rows from some_table) where <some criterion>", mysql scans "many rows" no matter what. Postgresql can figure out the big picture.