Last active
November 21, 2018 16:16
-
-
Save stephencweiss/58fa8732d630f0eda7eed7edba19c6a7 to your computer and use it in GitHub Desktop.
Sample Queries on a Postgres Database with 10m primary records
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT (product_id, product_name, created_at) FROM descriptions WHERE product_id = 19282; | |
SELECT COUNT(product_id) FROM descriptions; | |
SELECT (product_id, product_name, created_at) FROM descriptions ORDER BY created_at DESC LIMIT 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The performance of the last 10 created query indicates a potential gain from indexing on
created_at