Skip to content

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.

SeverityFinding
CriticalA table has no primary key
WarningA foreign key column has no index (fix included)
WarningA table with 50,000+ rows has at most one index
WarningA column looks like it stores a secret in plain text (password, api_key, ssn, cvv…)
SuggestionA *_id column looks like a foreign key but has no constraint
SuggestionRedundant indexes on the same columns
SuggestionNo created_at / updated_at
Suggestion40 or more columns
SuggestionForeign keys with no ON DELETE behavior
InfoAn empty table

PostgreSQL only ​

SeverityFinding
Warning, or Critical when an auth schema existsRow-Level Security is off (fix included)
Warning or SuggestionA table grants privileges to PUBLIC (Warning when they include writes)
SuggestionAn 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 maxmemory limit (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.

Lily DB is free for personal and commercial use.