Skip to content

opt: per-span cost causes regression on TPC-C #54702

@nvb

Description

@nvb

We saw a drop in TPC-C performance on September 4th. I was able to reproduce this fairly easily (before = 11a8226, after = 9fae2ab):

name  old warehouses  new warehouses  delta
tpcc        625 ± 4%        530 ±18%  -15.20%  (p=0.008 n=5+5)

I bisected this to 8755d9a. It appears that something in that PR is causing issues for TPC-C.

Interestingly, we do see a change in one of the Delivery transaction's queries here. The plan moves from a scan of 10 precise spans to an imprecise scan over a secondary index, a filter, and an index join. This change seems strictly worse to me. This is supported by the fact that the plan does not change in the case where we have perfectly accurate stats.

So it appears that we have a regression here in some capacity. We should have reasonably accurate stats in TPC-C, so I'd be surprised if we were using the no-stats plan, but we should confirm. Even if not, something else is going on with that PR.

Assigning the release-blocker tag to this for now, until it's better understood.

Metadata

Metadata

Assignees

Labels

A-sql-optimizerSQL logical planning and optimizations.C-investigationFurther steps needed to qualify. C-label will change.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions