Skip to content
  • Home
  • About
  • Contact
  • Twitter
  • Facebook
  • Google+
  • GitHub
  • WordPress.com

Alexey Bashtanov PostgreSQL Blog

COUNT(*) vs COUNT(1) vs COUNT(id)

January 24, 2019 bashtanovLeave a comment

COUNT(*) returns the number of rows, and COUNT(foo) returns the number of rows with non-null foo. But there are lots of myths regarding COUNT(*), mostly coming from its syntax resembling SELECT *. Let’s bust them!
Read More »

Double negative and query performance

December 8, 2017December 9, 2017 bashtanovLeave a comment

In certain situations, a query can be optimised using double negation (NOT NOT).

PostgreSQL has two implementations of hash join: Hash Join itself and Hashed Subplan, which may serve anti- and semi-joins.

Read More »

Recent Posts

  • COUNT(*) vs COUNT(1) vs COUNT(id) January 24, 2019
  • Double negative and query performance December 8, 2017
Create a website or blog at WordPress.com
Back to top
  • Follow Following
    • Alexey Bashtanov PostgreSQL Blog
    • Already have a WordPress.com account? Log in now.
    • Alexey Bashtanov PostgreSQL Blog
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar