Post meta is cached when the post is retrieved, unless you specifically turn it off (which would be self-defeating here), so the latter will not force 10 SQL queries, and in fact, may not add any at all. See http://wordpress.stackexchange.com/a/39932/2226 Also: see get_post_custom().