include not on first getting ditinct list of item

This commit is contained in:
Paul Trowbridge 2018-03-01 17:23:07 -05:00
parent 7f0f415ed3
commit 7a406788da

View File

@ -1,4 +1,9 @@
EXPLAIN /*
first get distinct target json values
then apply regex
*/
WITH WITH
--------------------apply regex operations to transactions--------------------------------------------------------------------------------- --------------------apply regex operations to transactions---------------------------------------------------------------------------------
@ -92,11 +97,13 @@ WHERE
e.v @> '{"map":"y"}'::jsonb e.v @> '{"map":"y"}'::jsonb
--rec @> '{"Transaction":"ACH Credits","Transaction":"ACH Debits"}' --rec @> '{"Transaction":"ACH Credits","Transaction":"ACH Debits"}'
--rec @> '{"Description":"CHECK 93013270 086129935"}'::jsonb --rec @> '{"Description":"CHECK 93013270 086129935"}'::jsonb
/*
ORDER BY ORDER BY
t.id DESC, t.id DESC,
m.target, m.target,
e.rn, e.rn,
COALESCE(mt.rn,rp.rn,1) COALESCE(mt.rn,rp.rn,1)
*/
) )
--SELECT * FROM rx LIMIT 100 --SELECT * FROM rx LIMIT 100