# LogicTest: local

statement ok
CREATE TABLE kv (k INT PRIMARY KEY, v INT, FAMILY (k, v))

query T
EXPLAIN ANALYZE (PLAN) SELECT k FROM kv WHERE k >= 2
----
planning time: 10µs
execution time: 100µs
distribution: <hidden>
vectorized: <hidden>
plan type: custom
maximum memory usage: <hidden>
network usage: <hidden>
regions: <hidden>
isolation level: serializable
priority: normal
quality of service: regular
·
• scan
  sql nodes: <hidden>
  kv nodes: <hidden>
  regions: <hidden>
  actual row count: 0
  KV time: 0µs
  KV contention time: 0µs
  KV rows decoded: 0
  KV bytes read: 0 B
  KV gRPC calls: 0
  estimated max memory allocated: 0 B
  missing stats
  table: kv@kv_pkey
  spans: [/2 - ]

statement ok
INSERT INTO kv VALUES (1,10), (2,20), (3,30), (4,40);

query T
EXPLAIN ANALYZE (PLAN) SELECT * FROM kv WHERE k >= 2
----
planning time: 10µs
execution time: 100µs
distribution: <hidden>
vectorized: <hidden>
plan type: custom
rows decoded from KV: 3 (24 B, 6 KVs, 3 gRPC calls)
maximum memory usage: <hidden>
network usage: <hidden>
regions: <hidden>
isolation level: serializable
priority: normal
quality of service: regular
·
• scan
  sql nodes: <hidden>
  kv nodes: <hidden>
  regions: <hidden>
  actual row count: 3
  KV time: 0µs
  KV contention time: 0µs
  KV rows decoded: 3
  KV pairs read: 6
  KV bytes read: 24 B
  KV gRPC calls: 3
  estimated max memory allocated: 0 B
  missing stats
  table: kv@kv_pkey
  spans: [/2 - ]

statement ok
GRANT SELECT ON crdb_internal.tables TO root;

query T
EXPLAIN (VERBOSE) SELECT * FROM system.privileges WHERE path = 'vtable/crdb_internal/tables'
----
distribution: local
vectorized: true
·
• scan
  columns: (username, path, privileges, grant_options, user_id)
  estimated row count: 10 (missing stats)
  table: privileges@privileges_path_user_id_key
  spans: /"vtable/crdb_internal/tables"-/"vtable/crdb_internal/tables"/PrefixEnd
