Re: BUG #13908: Query returns too few rows
От | David G. Johnston |
---|---|
Тема | Re: BUG #13908: Query returns too few rows |
Дата | |
Msg-id | CAKFQuwYsDPCi2CqRGmp+WZOGiJQa4Rga9LTRnM=DJfXoV16Cxw@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #13908: Query returns too few rows (seth-p@outlook.com) |
Список | pgsql-bugs |
On Tue, Feb 2, 2016 at 9:41 PM, Seth P <seth-p@outlook.com> wrote: > "barrid" is "character varying(8) NOT NULL", and some examples are > 'CANCEJ1' and 'USA06Z1'. > Consider... =E2=80=8BCREATE TABLE "rrr_temp" AS SELECT =E2=80=8Bidx, barrid FROM "rrr" = AND ...; --see note below CREATE TABLE "uuu_temp" AS SELECT barrid FROM "uuu" WHERE universe_hash =3D #; -- should get 7,993 record modify the WHERE clause for "rrr_temp" so you copy in the same records into rrr_temp as matched in the full query: # 1,275,138 from the explain analyze for A (and A-D too) Now run simple join sub-queries inside your count(*) If it repeats you should be able to supply the temporary table data as unless barrid values are somehow super-secret. You do not have to send the data to the public list either - you can send it privately to someone (not me, Tom should be good but confirm before sending). Hope that helps. David J.
В списке pgsql-bugs по дате отправления: