Joerg Sonnenberger <jo...@bec.de> writes: > On Sun, Jan 06, 2019 at 02:29:05PM -0500, Tom Lane wrote: >> * We should extend the ScanKeywordList representation to include a >> field holding the longest keyword length in the table, which >> gen_keywordlist.pl would have no trouble providing. Then we could >> skip downcasing and/or hashing for any word longer than that, replacing >> the current NAMEDATALEN test, and thereby putting a tight bound on >> the cost of downcasing and/or hashing.
> Correct, possibly even have an array for each class of keywords. I added that change to v8 and noted a further small improvement in my test case. That probably says something about the prevalence of long identifiers in information_schema.sql ;-), but anyway we can figure it's not a net loss. I've pushed that version (v8 + max_kw_len); if the buildfarm doesn't fall over, we can move on with looking at hashing. I took a quick look through the NetBSD nbperf sources at http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/nbperf/ and I concur with your judgment that we could manage translating that into Perl, especially if we only implement the parts we need. I'm curious what further changes you've made locally, and what parameters you were using. regards, tom lane