> Can someone explain why the following query takes 1 second when using > LIKE and takes 30 seconds when replacing LIKE by = in the WHERE ? Because there is no optimization built in, that notices, that your string does not contain a wildcard and would translate the restriction correspondingly. It is currently executed more or less like below:(I3.nameInfluence >= 'inf_vitesse' and I3.nameInfluence< 'inf_vitessf' and I3.nameInfluence LIKE 'inf_vitesse') I already wanted to try to add this optimization myself, but lacked the time so far. Anybody want to volunteer ? TODO: add LIKE optimization to use = if constant does not contain any wildcards Andreas
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
> TODO: add LIKE optimization to use = if constant does not contain any wildcards
Your information is obsolete ... try looking at the EXPLAIN VERBOSE
output for such a query.
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера