sql performance improvements - #1737
Conversation
1. add env `P_PARQUET_METADATA_CACHE_SIZE` for max parquet metadata cache size default 50 MB 2. update env `P_DATAFUSION_TARGET_PARTITIONS` default to 4*num_cpu 3. add metrics for parquet metadata cache reads
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe CLI adds a configurable Parquet metadata cache size, changes the default target partition calculation, applies the cache limit to DataFusion sessions, and removes Parquet metadata cache statistics reporting from query completion paths. ChangesParquet metadata cache configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/query/mod.rs`:
- Around line 1073-1098: Move the full-cache aggregation currently performed
after query completion into a periodic snapshot refresh or
cache-operation/scrape-time metrics path. Remove the per-query enumeration and
sorting around entries, entry_sizes, percentile, and the
p50_entry_bytes/p95_entry_bytes/max_entry_bytes calculations, while preserving
the resulting cache metrics through the selected refresh mechanism.
- Around line 1111-1121: Change the parquet metadata cache stats log in the
query flow from tracing::warn! to tracing::debug! so successful queries do not
emit warning-level snapshots, while preserving all existing fields and message
content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 4dae90c5-eaeb-4888-80ff-961c3b5c6ab8
📒 Files selected for processing (3)
src/cli.rssrc/metrics/mod.rssrc/query/mod.rs
P_PARQUET_METADATA_CACHE_SIZEfor max parquet metadata cache sizedefault 50 MB
P_DATAFUSION_TARGET_PARTITIONSdefault to 4*num_cpuSummary by CodeRabbit
New Features
Bug Fixes