以下よりも効率的な方法はありますか?
select * from transactions partition( partition1 )
union all
select * from transactions partition( partition2 )
union all
select * from transactions partition( partition3 );
以下よりも効率的な方法はありますか?
select * from transactions partition( partition1 )
union all
select * from transactions partition( partition2 )
union all
select * from transactions partition( partition3 );
クエリで PARTITION( partitionN ) 構文を使用することは非常にまれです。
通常は、パーティション キーの値を指定して、Oracle がパーティションの削除を実行できるようにするだけです。たとえば、テーブルが TRANSACTION_DATE に基づいて毎日分割されている場合
SELECT *
FROM transactions
WHERE transaction_date IN (date '2010-11-22',
date '2010-11-23',
date '2010-11-24')
今日のパーティション、昨日のパーティション、および前日のパーティションからすべてのデータを選択します。
追加のコンテキストを提供できますか? あなたの述語は何ですか?オプティマイザに複数のパーティションに対処するよう明示的に指示する必要があると考える理由は何ですか。たとえば、間違ったパーティション キーを使用している可能性があります。