Today I discovered a new favourite PostgreSQL client. It is called SQL Tabs . It is a platform independent PostgreSQL desktop client. Its GUI is simple and intuitive to use.
SQL Tabs features 9 different chart types to explore the data more easily on the spot. It allows you to insert markdown text next to your queries to give them more structure and/or explanation. You can explore the full feature set in the SQL Tabs Documentation .
Here is an example to show you the proportion of the 5 biggest tables in your database. It displays the result as a donut chart.
This is query I used to generate the graph.
/**
## 5 biggest tables
**/
--- chart donut
SELECT nspname || '.' || relname AS "relation",
pg_relation_size(C.oid) AS "size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
ORDER BY pg_relation_size(C.oid) DESC
LIMIT 5;
.
This is really a tool I can imagine working from a day to day basis with.
The only miss is, that common psql shortcuts like \dt
are not working. I am so used on exploring the schema with them, that don't want to learn any new (SQL-compliant) way.