The database almanac
- allows to select the data source for the report being edited.
- displays the schemas, tables and columns in the selected data source.
- suggests basic queries for exploring the data.
Selecting a data source
If you have more than one data source, the drop-down at the top of the almanac can be used to select the one to use for the report being edited. When selecting a data source the bottom part of the almanac changes to display the database schema.
Selecting a schema
If the selected data source has more than one top-level schema, a second drop-down appears that allows to switch the display of the tables/columns for each of the schemas.
The top-level of the almanac displays the list of tables with approximate row count for each of the tables.
The row counts are based on the database internal planner data and may not be exact, depending on the specific database behavior, the VACUUM scheduling and permissions of the user used to connect to the database.
By selecting a table, the almanac will switch to display the table's columns and each column type.
The almanac suggests basic queries that allow to quickly explore the data without having to type SQL. You can use this to get an overview of a new unfamiliar data set, or quickly look up values of tables or columns to use as a reference for writing a more complex query. At the top of the table details, several suggested queries are available. By clicking a box, a query is run and the results displayed as usual. If the SQL query editor is empty, the query will be displayed there. If you previously entered your own query, the suggested query would not replace it, but you can do so by clicking the "Replace Query" link next to the Run button, if you desire to do so.
The suggested queries for tables are:
- Quick Overview - shows 10 rows of data from the table
- Count - runs an exact count query
When selecting one of the columns, some more suggested queries appear, depending on the type of the column. Some examples are:
- A count over time trend for date/timestamp columns.
- Value statistics.
- Distinct values of the column.
- Top 10 values by count.