list_contains tests whether a list contains a specified value. In a posts table, it replaces substring matching when tags are stored as a list, making membership explicit and usable in SQL filters. section 10.1.7
Count posts carrying a tag
SELECT count(*) FROM posts WHERE postTypeId = 1 AND list_contains(tagNames, 'java'); The same predicate works with an enum list: list_contains(tagEnums, 'java'). On 28 million rows, the string-list operation runs in 0.24 seconds; the enum-list version runs in 0.17 seconds. section 10.1.7
