# Improving Partition Pruning for Cross-Type Joins in Tanzu Greenplum

DevFeed: [Improving Partition Pruning for Cross-Type Joins in Tanzu Greenplum](<https://devfeed.tech/articles/improving-partition-pruning-for-cross-type-joins-in-tanzu-greenplum-112925.md>)

Original publisher: [Read original article](<https://blogs.vmware.com/tanzu/improving-partition-pruning-for-cross-type-joins-in-tanzu-greenplum/>)

Author: VMware Community

Published: 2026-11-02T09:38:00Z

Content type: article

Language: en

Sources: [VMware](<https://devfeed.tech/sources/vmware-blogs.md>)

Topics: [database-optimization](<https://devfeed.tech/topics/database-optimization.md>), [table-partitioning](<https://devfeed.tech/topics/table-partitioning.md>), [data type](<https://devfeed.tech/topics/data-type.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [typesafety](<https://devfeed.tech/topics/typesafety.md>)

Tags: [constraint](<https://devfeed.tech/tags/constraint.md>), [cross](<https://devfeed.tech/tags/cross.md>), [framework](<https://devfeed.tech/tags/framework.md>), [greenplum](<https://devfeed.tech/tags/greenplum.md>), [inference](<https://devfeed.tech/tags/inference.md>), [modern-apps](<https://devfeed.tech/tags/modern-apps.md>), [partition](<https://devfeed.tech/tags/partition.md>), [vmware-tanzu-greenplum](<https://devfeed.tech/tags/vmware-tanzu-greenplum.md>)

## AI overview

GPORCA can now infer constraints through casts and other deterministic single-column expressions, allowing partition pruning for cross-type joins. In the example, a nanosecond timestamp filter is propagated through an implicit cast to a microsecond partition key, so the query can skip 364 of 366 daily partitions instead of scanning all of them. The change adds expression mapping, recursive tracing to base columns, and datetime type alignment; strict type compatibility checks are intended to prevent incorrect substitutions. Expression constraint handling is gated by the `optimizer_expression_constraints` GUC for incremental adoption, while the type correctness fixes are always active. The post says the optimization avoids query rewrites and manual redundant filters.

## Source excerpt

This technical post on VMware Tanzu Greenplum walks through the changes to GPORCA's constraint derivation framework that make partition pruning and predicate inference work for cross-type joins. The post Improving Partition Pruning for Cross-Type Joins in Tanzu Greenplum appeared first on Tanzu. The post Improving Partition Pruning for Cross-Type Joins in Tanzu Greenplum appeared first on VMware Blogs.