[wp-trac] [WordPress Trac] #18158: Meta Query for posts with a meta key not set (IS NULL).

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 17 13:00:19 UTC 2012


#18158: Meta Query for posts with a meta key not set (IS NULL).
-----------------------------------------------+---------------------------
 Reporter:  johnnyb                            |       Owner:
     Type:  enhancement                        |  georgestephanis
 Priority:  normal                             |      Status:  accepted
Component:  Query                              |   Milestone:  3.5
 Severity:  normal                             |     Version:  3.2.1
 Keywords:  has-patch needs-unit-tests commit  |  Resolution:
-----------------------------------------------+---------------------------

Comment (by georgestephanis):

 Replying to [comment:40 scribu]:
 > > wouldn't a multi-parameter join most often be more efficient than a
 single-param join and a where clause?
 >
 > I don't know. Do an EXPLAIN and share what you find out.

 They distill down to the same thing, but the consensus seems to be that
 keeping the filter in the WHERE may be more readable later.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18158#comment:42>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list