Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 200 RECORDS
- count_test=# SELECT COUNT(*) FROM posts;
- count
- -------
- 200
- (1 row)
- Time: 2.756 ms
- count_test=# SELECT COUNT(*) FROM posts WHERE topic = 1;
- count
- -------
- 18
- (1 row)
- Time: 0.552 ms
- count_test=# SELECT post_count FROM topics WHERE id = 1;
- post_count
- ------------
- 18
- (1 row)
- Time: 0.727 ms
- LOTS OF RECORDS
- count_test=# SELECT COUNT(*) FROM posts;
- count
- --------
- 267055
- (1 row)
- Time: 40.096 ms
- count_test=# SELECT COUNT(*) FROM posts WHERE topic = 1;
- count
- -------
- 26929
- (1 row)
- Time: 58.331 ms
- count_test=# SELECT post_count FROM topics WHERE id = 1;
- post_count
- ------------
- (0 rows)
- Time: 0.438 ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement