Skip to content

Commit 90da3f4

Browse files
committed
Update 01-virtual-column.md
1 parent 6b134a5 commit 90da3f4

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

docs/en/guides/55-performance/01-virtual-column.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ VALUES
5959
'{"id":5,"name":"bigquery","tags":["innovative","cost-efficient"],"pricings":[{"type":"Flat Rate","price":"Monthly"},{"type":"Flex","price":"Per query"}]}'
6060
);
6161

62+
INSERT INTO test SELECT * FROM test;
63+
INSERT INTO test SELECT * FROM test;
64+
INSERT INTO test SELECT * FROM test;
65+
INSERT INTO test SELECT * FROM test;
66+
INSERT INTO test SELECT * FROM test;
67+
6268
-- Refresh the virtual columns
6369
REFRESH VIRTUAL COLUMN FOR test;
6470

@@ -78,14 +84,14 @@ Exchange
7884
└── TableScan
7985
├── table: default.book_db.test
8086
├── output columns: [val['name'] (#2), val['tags'][0] (#3), val['pricings'][0]['type'] (#4)]
81-
├── read rows: 5
82-
├── read size: < 1 KiB
83-
├── partitions total: 1
84-
├── partitions scanned: 1
85-
├── pruning stats: [segments: <range pruning: 1 to 1>, blocks: <range pruning: 1 to 1>]
87+
├── read rows: 160
88+
├── read size: 4.96 KiB
89+
├── partitions total: 16
90+
├── partitions scanned: 16
91+
├── pruning stats: [segments: <range pruning: 6 to 6>, blocks: <range pruning: 16 to 16>]
8692
├── push downs: [filters: [], limit: NONE]
8793
├── virtual columns: [val['name'], val['pricings'][0]['type'], val['tags'][0]]
88-
└── estimated rows: 5.00
94+
└── estimated rows: 160.00
8995

9096
-- Explain the query execution plan for selecting only the 'name' field from the table.
9197
EXPLAIN
@@ -101,14 +107,14 @@ Exchange
101107
└── TableScan
102108
├── table: default.book_db.test
103109
├── output columns: [val['name'] (#2)]
104-
├── read rows: 5
105-
├── read size: < 1 KiB
106-
├── partitions total: 1
107-
├── partitions scanned: 1
108-
├── pruning stats: [segments: <range pruning: 1 to 1>, blocks: <range pruning: 1 to 1>]
110+
├── read rows: 160
111+
├── read size: 1.70 KiB
112+
├── partitions total: 16
113+
├── partitions scanned: 16
114+
├── pruning stats: [segments: <range pruning: 6 to 6>, blocks: <range pruning: 16 to 16>]
109115
├── push downs: [filters: [], limit: NONE]
110116
├── virtual columns: [val['name']]
111-
└── estimated rows: 5.00
117+
└── estimated rows: 160.00
112118

113119
-- Display all the virtual columns defined in the system.
114120
SHOW VIRTUAL COLUMNS;

0 commit comments

Comments
 (0)