# How does SQLEye capture queries?

> It uses the server's own tooling: PostgreSQL statement logging in JSON, and MySQL performance_schema.

Source: https://sqleye.com/docs/faq/how-does-sqleye-capture-queries/ · Last updated: 2026-11-29 · Publisher: CodeROG (https://coderog.com)

SQLEye asks the database server what it is doing. For PostgreSQL it turns on statement logging in JSON format and tails the log. For MySQL it reads performance_schema statement history. There is no proxy, agent or library involved, and capture is off by default for each instance.

On PostgreSQL, SQLEye sets log_min_duration_statement to 0 while capture is on and back to -1 when it is off, applying the change with a configuration reload instead of a restart. On MySQL, it polls the statement history table at a short interval; if more statements arrive between polls than the history holds, some can be missed.

Each event carries the SQL, duration, connection and, on MySQL, rows examined. SQL text is truncated at 8 KB per event. See [Capture](/docs/live-eye/capture/) for the mechanics and [Engines](/docs/engines/) for the per-engine differences.
