Open mgartner opened 2 years ago
We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!
Moving to cold storage since this requires disabling a rule.
To reproduce:
SimplifyRootOrdering
by commenting it out here: https://github.com/cockroachdb/cockroach/blob/37ed37650402d538af475dcfb4f44c5b7b14196a/pkg/sql/opt/xform/optimizer.go#L815-L829query T EXPLAIN SELECT a, b, c, count(*) FROM t GROUP BY b, a, c ORDER BY c, b DESC, b DESC
distribution: local vectorized: true · • group (partial streaming) │ group by: a, b, c │ ordered: +c,-b │ └── • sort │ order: +c,-b │ └── • scan missing stats table: t@t_pkey spans: FULL SCAN
query T EXPLAIN ANALYZE SELECT a, b, c, count(*) FROM t GROUP BY b, a, c ORDER BY c, b DESC, b DESC
planning time: 10µs execution time: 100µs distribution:
vectorized:
maximum memory usage:
network usage:
regions:
·
• group (streaming)
│ nodes:
│ regions:
│ actual row count: 0
│ estimated max memory allocated: 0 B
│ estimated max sql temp disk usage: 0 B
│ group by: a, b, c
│ ordered: +c,-b,-b
│
└── • sort
│ nodes:
│ regions:
│ actual row count: 0
│ estimated max memory allocated: 0 B
│ estimated max sql temp disk usage: 0 B
│ order: +c,-b
│
└── • scan
nodes:
regions:
actual row count: 0
KV time: 0µs
KV contention time: 0µs
KV rows read: 0
KV bytes read: 0 B
KV gRPC calls: 0
estimated max memory allocated: 0 B
missing stats
table: t@t_pkey
spans: FULL SCAN