Recent Posts

(TIL) SQL: Count Records By Type

less than 1 minute read

If you have a table with some sort of type column on it, you can come up with a count of the records in that table by type. You just need to take advantage o...

(TIL) PSQL: List Connections To A Database

less than 1 minute read

The pg_stat_activity table can be used to determine what connections there currently are to the PostgreSQL server and to a particular database. To see the pr...

(TIL) PSQL: Sleeping

less than 1 minute read

Generally you want your SQL statements to run against your database as quickly as possible. For those times when you are doing some sort of debugging or just...