# db inspect

> db inspect — Turso documentation.
> Canonical HTML: https://tursodb.cn/docs/cli/db/inspect/
> Upstream Source (MIT): https://docs.turso.tech/cli/db/inspect
> Language: en

---
You can inspect the usage of a database, including the total space used, rows read and written with the following command:

```bash
turso db inspect <database-name>
```

## Flags

| Flag | Description |
| - | - |
| `--queries` | Show database query statistics. |
| `--verbose` | Show detailed information, including the location and instance type. |

## Examples

### Top Queries

You can fetch the most executed, resource-intensive SQL statements that have been run against your database using the Turso CLI:

```bash Command
turso db inspect <database-name> --queries
```

```bash Response
SELECT * FROM Orders WHERE Status = 'Pending';
SELECT COUNT(*), CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) > 5;
SELECT Orders.OrderID, Customers.CustomerName FROM Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;
UPDATE Products SET Price = Price * 1.10 WHERE Category = 'Electronics';
```
