BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present

Поиск
Список
Период
Сортировка
От Fahad
Тема BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present
Дата
Msg-id 200501122308.j0CN8tbc025002@developer.pgadmin.org
обсуждение исходный текст
Ответы Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1393
Logged by:          Fahad
Email address:      Fahad.Gilani@anusf.anu.edu.au
PostgreSQL version: 8.0.0rc2
Operating system:   Linux
Description:        Adding 'LIMIT 1' to the query halts forever if no data
present
Details:

Hi,

In an empty table, if I do this:

"SELECT some_field WHERE some_field = 45 ORDER BY time";

This returns instantly with no results. However, doing the following takes
forever to return:

"SELECT some_field WHERE some_field = 45 ORDER BY time LIMIT 1";

It's a pain because my application is pretty generic and does not know
beforehand whether 'some_field' with ID 45 exists or not OR whether the
table has been wiped out clean. Why does it take so long for this query to
return?


Fahad

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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: [pgsql-www] tsearch2 headline function fails to parse integer arguments
Следующее
От: "Ivan Chumak"
Дата:
Сообщение: BUG #1380: dont reading messages in russian languages