LIMIT clause extremely slow

Поиск
Список
Период
Сортировка
От Melzer Kassensysteme
Тема LIMIT clause extremely slow
Дата
Msg-id 00f201da17e3$439404c0$cabc0e40$@melzer-kassen.com
обсуждение исходный текст
Ответы Re: LIMIT clause extremely slow  (Christophe Pettus <xof@thebuild.com>)
Re: LIMIT clause extremely slow  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-bugs

Hi,

 

I have an issue using a limit clause, f.ex.

 

SELECT * FROM table WHERE (index1 > 1 OR (index1 = 1 AND index2 > 5)) ORDER BY index1, index2 LIMIT 1

 

index1 and index2 are index fields of datatype integer.

 

This takes some 100 times longer than in Mysql or other databases under same conditions (and I have to repeat this command very often, so time is adding up).

I have read in some forums that you can fasten it up by saying

ORDER BY index1 + 0, index2 + 0

The result is better, but still very slow.

 

Using version 16.1

 

Thanks for your help and best regards, Florian Melzer

 

___________________________________________

MELZER_GmbH_WBK_bo_pos_4c

Melzer GmbH

Schlagturn 26, A-6135 Stans

FN 463940s beim LG Innsbruck mit Sitz in Stans

UID: ATU71726803

Tel +43 (0) 5242 71361

www.melzer-kassen.com

office@melzer-kassen.com

 

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18200: Undefined behaviour in interval_div
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: BUG #18200: Undefined behaviour in interval_div