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

From: David Noel <david(dot)i(dot)noel(at)gmail(dot)com>
To: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)
Date: 2014-04-29 07:34:57
Message-ID: CAHAXwYAN4TZV3aUS1uT4g92Renwior90-rxbV-C+AJ8hhMt90A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/29/14, David Noel <david(dot)i(dot)noel(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Noel 2014-04-29 07:42:36 Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)
Previous Message Achilleas Mantzios 2014-04-29 07:33:56 Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)