SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)

Поиск
Список
Период
Сортировка
От David Noel
Тема SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)
Дата
Msg-id CAHAXwYC0otNfPTHDrNfg3=qs2KOg1YZ6UvpAXZQWkLuSZJR3yA@mail.gmail.com
обсуждение исходный текст
Ответы Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)  (David Noel <david.i.noel@gmail.com>)
Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)  ("Tomas Vondra" <tv@fuzzy.cz>)
Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
The query I'm running is:

"select page.*, coalesce((select COUNT(*) from sentence where
sentence."PageURL" = page."URL" group by page."URL"), 0) as
NoOfSentences from page WHERE "Classification" LIKE CASE WHEN "<>"
THEN " ELSE '%' END ORDER BY "PublishDate" DESC Offset 0 LIMIT 100"

I can post the table definitions if that would be helpful but I don't
have them on hand at the moment.

The gist of it though is that "page" and "sentence" are two tables.
page.URL maps to sentence.PageURL. The page table has the columns
"Classification", and "PublishDate". URL, PageURL, and Classification
are strings. PublishDate is a timestamp with timezone.

Both queries are run from a Java project using the latest JDBC driver.
The PostgreSQL Server versions it's being run on are 9.2 and 9.3. The
query executes and returns just fine when run on a FreeBSD-based
platform, but executes forever when run under Windows.

Does anyone have any idea why this might be happening? Are there
platform/syntax compatibility issues I'm triggering here that I'm
unaware of? Is there something wrong with the query?

We're going to try to test it under Linux too, but that system will
have to be set up first so it might be a while before we know those
results.

Any thoughts would be appreciated,

David Noel


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

Предыдущее
От: David G Johnston
Дата:
Сообщение: Re: xml question
Следующее
От: Achilleas Mantzios
Дата:
Сообщение: Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)