Home > database >  Query Oracle partition problem
Query Oracle partition problem

Time:09-30

Select * from table1 partition (id)
Can only query a partition, I now want to check several partitions,

In addition to the writing below, there are no other way to
Select * from table1 partition (id)
Union all
Select * from table1 partition (id2)
.
Select * from table1 partition (idns)

CodePudding user response:

In the where condition, it is ok to use partition table directly, this is what the benefits of the partition table;

CodePudding user response:

Select * from table1 where id between x and x; Make it your own partition not line

CodePudding user response:

Efficiency is very slow,

CodePudding user response:

reference 1st floor wmxcn2000 response:
in the where condition, the direct use of the partition table is ok, this is what the benefits of the partition table;


Efficiency is slow, I record many tens of millions of records

CodePudding user response:

If the efficiency is poor, do you want to see the execution plan, if there are any partitions cutting,
  • Related