Changes between Initial Version and Version 1 of Ticket #39768, comment 9
- Timestamp:
- 12/22/2019 06:22:43 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #39768, comment 9
initial v1 10 10 Using `CONVERT()` appears to be a better option. While `utf8mb4` should be available on any modern install, that may not always be the case, so we have to check for it specifically, and fall back to the current query otherwise. This option also has some performance difference from the queries above in my testing: 11 11 {{{ 12 SELECT post_id FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = CONVERT( %sUSING utf8mb4 ) COLLATE utf8mb4_bin12 SELECT post_id FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = CONVERT( '2009/03/myimage.jpg' USING utf8mb4 ) COLLATE utf8mb4_bin 13 13 Query took 0.0315 seconds 14 14 }}}