# Sidebar, Open Anything and tabs

The sidebar lists the schemas and objects in the current database, one shortcut opens any object or saved query by name, and two more switch database and connection.

## Where to find it

| Action | How |
| --- | --- |
| Open anything | `⌘P` (`Ctrl+P`) |
| Switch database | `⌘K` (`Ctrl+K`) |
| Switch connection | `⌘⇧K` (`Ctrl+Shift+K`), or `File` > `New Workspace…` |
| Go to a tab | `⌘1` to `⌘9` (`Ctrl+1` to `Ctrl+9`), where 9 is the last tab |
| Previous or next tab | `⌘[` or `⌘]` (`Ctrl+[` or `Ctrl+]`) |
| Close tab | `⌘W` (`Ctrl+W`), or `File` > `Close Tab` |
| Hide or show the sidebar | `⌘⌃S` (`Ctrl+Alt+S`), or `View` > `Toggle Sidebar` |
| Refresh the catalog | `Refresh catalog` at the top of the sidebar |
The sidebar has three tabs: `Objects`, `History` and `Saved`.

## The sidebar

`Objects` lists each schema with groups for `Tables`, `Views`, `Materialized views`, `Functions`, `Sequences` and `Enums`, and each group shows how many objects it holds. `Show row estimates` under `Catalog display settings` adds the server's row estimate beside each table. Typing in `Filter objects` turns the tree into a flat list of matching objects, each prefixed with its schema. Right-click a table for `Open in New Tab`, `Open Structure`, `Copy Qualified Name` and `Refresh`.

![The Objects tab with the bookshop schema expanded, listing eight tables with row estimates such as 120 for orders, the book_sales view, the touch_orders_updated_at function, and empty Materialized views, Sequences and Enums groups.](https://bobbytables.app/docs/img/navigation/01-sidebar.png)

_Each group shows its object count, and each table can show the server's row estimate._

![Filter objects containing or, with the tree reduced to bookshop.orders, bookshop.order_items, bookshop.authors, bookshop.inventory, bookshop.customers and the touch_orders_updated_at function.](https://bobbytables.app/docs/img/navigation/02-sidebar-filter.png)

_Letters match in order, so or also finds authors and inventory._

## Open Anything

`⌘P` (`Ctrl+P`) opens `Open anything`, which searches the tables, views, functions and saved queries of the current connection. The right column shows an object's schema, or `Saved query` for a saved query. `Enter` opens the result in a preview tab and `Cmd/Ctrl+Enter` opens it pinned. The list also offers `Backups…` and `Create snapshot…`.

[Command P opens Open anything, typing ord narrows the list to order_items, orders, the Open orders saved query and touch_orders_updated_at, and Enter opens order_items in the preview tab in place of authors.](https://bobbytables.app/docs/video/navigation/03-open-anything.mp4)

_Tables and saved queries share one list._

![Open anything with rev typed, listing the reviews table with bookshop beside it and Reviews by rating with Saved query beside it, followed by system views from information_schema and pg_catalog.](https://bobbytables.app/docs/img/navigation/04-open-anything-rev.png)

_The right column tells objects and saved queries apart._

## Switching database and connection

`⌘K` (`Ctrl+K`) opens `Switch database`, which lists the databases on the server and marks the `current` one. `Enter` opens the choice in a new workspace, `Shift+Enter` replaces the current one, and `Cmd/Ctrl+Enter` opens a new window. `⌘⇧K` (`Ctrl+Shift+K`) opens `Switch connection`, which lists saved connections by group and marks those with a workspace as `open`. `Enter` focuses that workspace, or connects and asks which database to open.

![Switch database listing bookshop marked current, two other databases on the same server, and postgres, with Enter, Shift+Enter and Cmd/Ctrl+Enter described in the footer.](https://bobbytables.app/docs/img/navigation/05-switch-database.png)

_The footer names the three ways to open a database._

![Switch connection listing Bookshop (MySQL) and Bookshop (PostgreSQL) marked open under Databases, the other saved connections under Databases and Files, and New connection… and Home under Connections.](https://bobbytables.app/docs/img/navigation/06-switch-connection.png)

_A connection marked open already has a workspace._

## Tabs

A single click on an object in the sidebar opens it in a preview tab with an italic title, and the next object you open that way replaces it. `Open in New Tab` opens a pinned tab, which shows a pin icon. Right-click a tab for `Pin` or `Unpin`, `Close`, `Close Others` and `Close to the Right`.

![The tab strip with a pinned Query 1 tab, an italic authors preview tab and pinned orders and books tabs, with the preview tab's menu open showing Pin, Close, Close Others and Close to the Right.](https://bobbytables.app/docs/img/navigation/07-tab-context-menu.png)

_An italic title marks the preview tab, and pinned tabs carry a pin icon._

## Hiding the sidebar

`⌘⌃S` (`Ctrl+Alt+S`) hides the sidebar and gives its width to the tabs, and the same shortcut brings it back.

![The window with the sidebar hidden and the orders data grid filling the full width, showing columns through updated_at.](https://bobbytables.app/docs/img/navigation/08-sidebar-hidden.png)

_With the sidebar hidden, the grid shows more columns._

## Good to know

- The sidebar and `Open anything` show the catalog the app has loaded, so choose `Refresh catalog` after creating a table outside Bobby Tables.
- On MySQL the sidebar groups each database's objects into `Tables`, `Views`, `Routines` and `Triggers`.
- `History` and `Saved` are described in [SQL editor](https://bobbytables.app/docs/sql-editor).
- Redis, Cassandra, MongoDB and file connections open their own workspaces without this sidebar.

## Related

- [Connections](https://bobbytables.app/docs/connections.md)
- [SQL editor](https://bobbytables.app/docs/sql-editor.md)
- [Table data](https://bobbytables.app/docs/table-data.md)
