Improve the performance of LIKE/regex estimation in non-C locales, by making
make_greater_string() try harder to generate a string that's actually greater
than its input string. Before we just assumed that making a string that was
memcmp-greater was enough, but it is easy to generate examples where this is
not so when the locale is not C. Instead, loop until the relevant comparison
function agrees that the generated string is greater than the input.
Unfortunately this is probably not enough to guarantee that the generated
string is greater than all extensions of the input, so we cannot relax the
restriction to C locale for the LIKE/regex index optimization. But it should
at least improve the odds of getting a useful selectivity estimate in
prefix_selectivity(). Per example from Guillaume Smet.
Backpatch to 8.1, mainly because that's what the complainant is using...
indxpath.c (r18.104.22.168 -> r22.214.171.124)
selfuncs.c (r126.96.36.199 -> r188.8.131.52)
selfuncs.h (r1.24 -> r184.108.40.206)
pgsql-committers by date
|Next:||From: Kavita Arora||Date: 2007-11-07 22:42:25|
|Subject: Job opportunity in AZ.....|
|Previous:||From: Tom Lane||Date: 2007-11-07 22:37:33|
|Subject: pgsql: Improve the performance of LIKE/regex estimation in non-C |