Skip to content

Instantly share code, notes, and snippets.

@dsmdavid
Created December 1, 2022 09:53
Show Gist options
  • Save dsmdavid/ecec047b7d3e97e5bc959e3caae02763 to your computer and use it in GitHub Desktop.
Save dsmdavid/ecec047b7d3e97e5bc959e3caae02763 to your computer and use it in GitHub Desktop.
-- ~ 45s
select hash_agg(*), 'original' as s_
from "LINEITEM_ORIGINAL"
union all
select hash_agg(*), 'exact_copy' as s_
from "LINEITEM_EXACT_COPY" ;
select hash_agg(*), 'original' as s_
from "LINEITEM_ORIGINAL"
union all
select hash_agg(*), 'not_quite_exact_copy' as s_
from "LINEITEM_FEW_CHANGES" ;
-- ~ 7m
select *
from "LINEITEM_ORIGINAL"
minus
select *
from "LINEITEM_EXACT_COPY" ;
select *
from "LINEITEM_ORIGINAL"
minus
select *
from "LINEITEM_FEW_CHANGES" ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment