Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows)
| От | David Noel |
|---|---|
| Тема | Re: SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows) |
| Дата | |
| Msg-id | CAHAXwYAN4TZV3aUS1uT4g92Renwior90-rxbV-C+AJ8hhMt90A@mail.gmail.com обсуждение исходный текст |
| Ответ на | SQL query runs fine on one platform (FreeBSD), but hangs on another (Windows) (David Noel <david.i.noel@gmail.com>) |
| Список | 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 по дате отправления: