Help › Explore a database

Browse the keys of a Redis database

Scan a Redis database's keys by pattern and type, see them grouped as a tree, and read a key's value, expiry and size.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

A keys tab shows one numbered database of a Redis connection: on the left the keys found so far, grouped as a tree, and on the right the key you choose, with its value in the same grid as any query's results.

To open one, double-click a database under Databases in the sidebar, or select it and choose Query › Browse Keys.

Find keys

Querlyn reads keys a page at a time with SCAN, which never holds the server up, and never with KEYS. The line under the bar says how far the scan is: how many keys are listed, and about how many of the database's keys it has looked at.

  • Match is a pattern, as Redis reads it: * stands for any text, ? for one character, and [ab] for one of the characters listed. user:* finds every key that starts with user:. Empty finds every key.
  • The type menu (Any type) narrows the scan to strings, hashes, lists, sets, sorted sets, streams or JSON documents.
  • Scan starts again from the beginning with the pattern and type as they are. ↩ on macOS or Enter on Windows and Linux in Match does the same. Query › Scan Keys Again is the same command.
  • Scan More reads the next page. Query › Scan More Keys is the same command. A narrow pattern on a large database can match nothing in the keys one page looks at: the status line says so, and Scan More goes on from there.

The pattern and the type are checked by the server, so a narrow pattern costs it no more than a wide one, but the server still looks at every key to find the few that match.

Note: A scan sees the database as it changes. A key created or deleted while you scan may or may not be listed; Scan reads it afresh.

A keys tab lists up to 100,000 keys. When it holds that many it says so: narrow the pattern or the type to see others.

Read the tree

Keys are grouped by the text in Group by, a colon unless you change it: user:42:name is under user: and then 42:. A folder shows how many listed keys are under it; a key shows its type and, when it expires, how long it has left. Folders exist only in the tab: the server knows keys, not folders. Empty Group by for a flat list.

Click a folder to open or close it and a key to show it. With the keyboard, ↑ on macOS or Up on Windows and Linux and ↓ on macOS or Down on Windows and Linux move, → on macOS or Right on Windows and Linux opens a folder, ← on macOS or Left on Windows and Linux closes it or goes to the folder a key is in, and ↩ on macOS or Enter on Windows and Linux shows the selected key. Query › Copy Key Name copies the selected key's name, quoted where a command would need it.

Right-click a key to open it with a menu of the tab's commands for it: read it again, add to it, edit it, set its expiry, rename it, delete it.

A name that is not text is shown with \x and two hex digits for each byte that is not, as redis-cli shows it. Querlyn sends it back to the server unchanged.

Read a key

Choosing a key shows, above its value, its type, when it expires, its length, the memory the server says it takes and how the server stores it. In a narrow window these facts take a second line. Query › Read Key Again (the Refresh button) reads it afresh.

A string or a JSON document is one cell of the grid, where line breaks show as ↵. Opening one also opens the value viewer beside the grid, which shows the text on its own lines. View › Toggle Value Viewer closes it.

TypeWhat the grid showsHow it is read
StringOne row: the valueWhole, up to 1 MiB; of a longer one the first 1 MiB, and a message says so
HashA row for each field, with its valueA page at a time (HSCAN)
ListA row for each item, with its positionA range at a time (LRANGE)
SetA row for each memberA page at a time (SSCAN)
Sorted setA row for each member, with its score, lowest firstA range at a time (ZRANGE)
StreamA row for each entry: its ID, the time in the ID, and its fields as JSONA page at a time (XRANGE)
JSONOne row: the documentWhole (JSON.GET)

Rows load as you scroll, within the memory budget of any result, so a key with millions of members opens at once. Everything the results grid does works here: the record view, the value viewer, sorting and filtering the loaded rows, copying and exporting them.

A value that is not text is shown as bytes and never changed on the way. A key of a type that a module adds and Querlyn has no view for says so; its module's commands work in a query tab.

To change a key, see Change a Redis key.

On a cluster

A keys tab on a cluster lists the keys of every node. The scan goes through the cluster's primaries one after another, and the line under the bar says how many it has been through; point at it to see each node and how far the scan is with it. The key counts are the nodes' together.

A node that cannot be reached is named under that line, with the reason, and its keys are not listed; the scan goes on with the next node. Scan tries it again. See Connect to Redis for a cluster that announces addresses your computer cannot reach.

A key's value is read from the node that holds it, wherever the connection points.

Help for Querlyn 0.1.0. All help topics