Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows) - Mailing list pgsql-general

From David Noel
Subject Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)
Date
Msg-id CAHAXwYAN4TZV3aUS1uT4g92Renwior90-rxbV-C+AJ8hhMt90A@mail.gmail.com
Whole thread Raw
In response to SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)  (David Noel <david.i.noel@gmail.com>)
List pgsql-general
On 4/29/14, David Noel <david.i.noel@gmail.com> wrote:
> 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"

Relevant schema below:

-------------------------------------------------

CREATE TABLE page
(
  "URL" text NOT NULL,
  "Title" text,
  "Article" text,
  "PublishDate" timestamp with time zone,
  "SiteName" text,
  "Classification" text,
...etc...
  CONSTRAINT page_pkey PRIMARY KEY ("URL")
)
WITH (
  OIDS=FALSE
);
ALTER TABLE page
  OWNER TO dba;

-------------------------------------------------

CREATE TABLE sentence
(
  "UUID" serial NOT NULL,
  "IDSentence" text NOT NULL,
  "Contents" text,
  "IDAuthor" text,
  "CreatedAt" text,
  "PageURL" text NOT NULL,
  CONSTRAINT sentence_pkey PRIMARY KEY ("UUID"),
  CONSTRAINT idpage_fkey FOREIGN KEY ("PageURL")
      REFERENCES page ("URL") MATCH Unknown
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE sentence
  OWNER TO dba;

-------------------------------------------------

-David


pgsql-general by date:

Previous
From: Achilleas Mantzios
Date:
Subject: Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)
Next
From: David Noel
Date:
Subject: Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)