Skip to content

Instantly share code, notes, and snippets.

@mkubala
Created July 10, 2020 11:55
Show Gist options
  • Save mkubala/f42a3c6bf387ac368c6e8dd70c2da8b9 to your computer and use it in GitHub Desktop.
Save mkubala/f42a3c6bf387ac368c6e8dd70c2da8b9 to your computer and use it in GitHub Desktop.
psql> select * from journal where deleted = false and tags @> ARRAY[3] and ordering > 1000 and ordering <= 3000 ORDER BY ordering asc limit 1000;
ordering | sequence_number | deleted | persistence_id | message | tags
----------+-----------------+---------+----------------+----------+---------
1003 | 100 | f | p-3 | \x348b31 | {3,101}
1013 | 101 | f | p-3 | \x348b31 | {3,102}
1023 | 102 | f | p-3 | \x348b31 | {3,103}
Time: 1129.634 ms (00:01.130)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment