Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement