http://www.davidpashley.com/blog/2008/04/30#not-like asks Hoosgot,
Dear lazyweb, I’m possibly being stupid, but can someone explain the differences between these two queries? mysql> select count(*) from Table where blobid is null or not blobid like ‘%-%’; +———-+ | count(*) | +———-+ | 15262487 | +———-+ 1 row in set (25 min 4.18 sec) mysql> select count(*) from Table where blobid is null or blobid not like ‘%-%’; +———-+ | count(*) | +———-+ | 20044216 | +———-+ 1 row in set (24 min 54.06 sec) For reference: mysql> select count(*) from Table where blobid is null; +———-+ | count(*) | +———-+ | 15262127 | +———-+ 1 row in set (24 min 7.15 sec) Update: It turns out that the former was doing (not blobid) like ‘%-%’ which … Visit the blog to lend your wisdom, or you can comment below.Not like not like not like
April 30th, 2008 · No Comments
Tags: Uncategorized
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment