You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+79-5Lines changed: 79 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ There are differences between spanner-mycli and spanner-cli that include not onl
15
15
16
16
*[More concise `EXPLAIN` and `EXPLAIN ANALYZE` output](#more-concise-format-of-explain-and-explain-analyze), making efficient use of limited display space.
17
17
* Optimized for narrower terminals and code blocks.
18
+
* Compact format and query plan wrapping to fit into more limited space.
18
19
* Respects my minor use cases
19
20
* Protocol Buffers support as `SHOW LOCAL PROTO`, `SHOW REMOTE PROTO`, `SYNC PROTO BUNDLE` statement
20
21
* Can use embedded emulator (`--embedded-emulator`)
@@ -1871,11 +1872,84 @@ Predicates(identified by ID):
1871
1872
```
1872
1873
1873
1874
-`execution_method: {Row|Batch}` metadata is simply displayed as `<Row>` or `<Batch>` after display name of operator.
1874
-
- Target metadata, `distribution_table: <target>` and `scan_target: <target>`, are displayed as `on <target>` after display name of operator.
1875
-
-`Full scan: true` is shortened as `Full scan`.
1875
+
- Target metadata, `distribution_table: <target>`, `scan_target: <target>`, and `table: <target>` are displayed as `on <target>` after display name of operator.
1876
+
- Some metadata with boolean value is printed as label.
1877
+
- For example, `Full scan: true` and `split_ranges_aligned: true` are shortened as `Full scan` and `split_ranges_aligned`, and they are not printed if the value is `false`.
1876
1878
- Column names of `EXPLAIN ANALYZE` are shorter than before.
1877
1879
1878
-
Note: These changes except column names can be controlled using `SET CLI_SPANNER_CLI_COMPATIBLE_PLAN=TRUE`.
1880
+
Note: These changes except column names can be controlled using `EXPLAIN [ANALYZE] FORMAT=TRADITIONAL` or `SET CLI_EXPLAIN_FORMAT=TRADITIONAL`.
1881
+
1882
+
To support more limited width environment, there are further options.
1883
+
#### Compact format
1884
+
1885
+
`FORMAT=COMPACT` option removes characters that use width for readability, as long as it doesn't compromise information.
1886
+
1887
+
- Whitespace is generally not inserted.
1888
+
- The characters used for the tree will only be one character wide per level.
When you want to adjust the width, such as when displaying an execution plan on media where horizontal scrolling is not possible and content might be truncated or wrapped,
1917
+
you can use the `WIDTH=<width>` option to wrap the content of the `Operator` column at the specified width.
1918
+
1919
+
For example, in the illustration below, by setting the width of the ASCII tree drawn in the Operator column to 39 characters,
1920
+
the entire output, including the ASCII table, can fit within 80 characters.
Note: Since the widths of columns other than the Operator column are not deterministic, there may be cases where the output does not fit within 80 characters even with the same settings, such as when the number of Rows is large.
0 commit comments