Quantcast
Channel: Joel on SQL
Browsing all 25 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Finding missing foreign keys

By coincidence I stumbled upon a table where one of its columns didn’t have a foreign key. I found this strange, since our convention is to always add foreign keys when appropriate. But humans are...

View Article


Image may be NSFW.
Clik here to view.

Pgcronjob: Cron daemon to run user defined functions

I find myself quite often having to split a large write operation such as updating millions of rows in a heavily used table. This usually boils down to writing a small Perl script that runs a small...

View Article


Image may be NSFW.
Clik here to view.

PgTerminator: Kill misbehaving db users if important processes are waiting

If you are a DBA and ever have had to manually call pg_terminate_backend() to kill some misbehaving backend process, then this tool might be of interest. Long running queries are not a problem, as long...

View Article

Image may be NSFW.
Clik here to view.

pg_catalog visualized

I couldn’t find any graph showing all the relations between all the pg_catalog tables, so just for fun I wrote a little script to parse the SGML and generate a graph using GraphViz. #!/usr/bin/perl use...

View Article

Using pg_badplan to CREATE STATISTICS is a good plan

Thanks to Thomas Vondra’s presentation CREATE STATISTICS – What is it for? at Nordic PGDay 2018, my Trustly colleague Claes Jakobsson came up with the idea for a new extension. The presentation...

View Article

Browsing all 25 articles
Browse latest View live