Guest User

Untitled

a guest
Aug 20th, 2019
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select count(*)
  2. from child
  3. tablesample bernoulli(5) -- If you're only after an estimate, TABLESAMPLE is your friend.
  4. left join parent on (child.parent_id = parent.id)
  5. where parent.id is null
RAW Paste Data