Health Check
Health Check scans a database for common design and security problems and lists them by severity.
- SQL: Tools › Health check in the sidebar, on PostgreSQL, MySQL, SQLite and SQL Server.
- MongoDB and Redis: the stethoscope button in their workspace.
Filter the list with the Critical, Warning, Suggestion and Info chips. Copy report puts the whole report on the clipboard as Markdown. Re-run scans again.
SQL rules
Lily checks up to 150 tables. Rules about table size use the row counts already loaded in the sidebar.
| Severity | Finding |
|---|---|
| Critical | A table has no primary key |
| Warning | A foreign key column has no index (fix included) |
| Warning | A table with 50,000+ rows has at most one index |
| Warning | A column looks like it stores a secret in plain text (password, api_key, ssn, cvv…) |
| Suggestion | A *_id column looks like a foreign key but has no constraint |
| Suggestion | Redundant indexes on the same columns |
| Suggestion | No created_at / updated_at |
| Suggestion | 40 or more columns |
| Suggestion | Foreign keys with no ON DELETE behavior |
| Info | An empty table |
PostgreSQL only
| Severity | Finding |
|---|---|
Warning, or Critical when an auth schema exists | Row-Level Security is off (fix included) |
| Warning or Suggestion | A table grants privileges to PUBLIC (Warning when they include writes) |
| Suggestion | An index has never been used (primary keys and unique indexes are skipped) |
The auth schema check targets Supabase and other PostgREST setups, where a table without RLS can be readable through the API.
MongoDB rules
Up to 150 collections:
- Warning: 10,000+ documents and no secondary index.
- Suggestion: more than 12 indexes; documents averaging 64 KB or more.
- Info: an empty collection.
Redis rules
Lily samples 200 keys:
- Warning: keys of 1 MB or more; no
maxmemorylimit (fix included). - Suggestion: 80% or more of the sampled keys have no TTL; the eviction policy is
noeviction(fix included); memory fragmentation above 1.5. - Info: how many keys were evicted so far.
Fixes
Findings with a fix have Copy fix. On SQL connections, Open in editor puts it in a new query tab, where the usual guardrails apply. Nothing runs from the Health Check itself.
The foreign-key index fix is a plain CREATE INDEX. On a busy PostgreSQL table, add CONCURRENTLY before running it.
AI architecture review
With AI set up, a review starts after the scan: prioritized advice on the design as a whole. It sends the schema and the finding titles (for Redis, server facts and the findings, which can include key names). Stop cancels it.
