Home > database >  ORACLR $table how to count to fast?
ORACLR $table how to count to fast?

Time:01-14

Level, have a lot of $$party a table over the table, with the count (*) count (the shortest index) count (primary key) count (1) the big difference, count4 billion table for the first time, more than in 80 s, bosses, how to optimize to shorten when he? 80 s certainly can't,

CodePudding user response:

What are your plans with the execution of these? Count (primary key) INDEX should be go FAST FULL SCAN this is supposed to be the fastest,
In addition, the storage device is you this site or store? Go index db file sequential read this wait event response time is it?
Or from the business level is optimized, often go to the count (*) what role a $table, there is no other way

CodePudding user response:

- provides two ways
1, partition or table, separate query, result sum again,
2, timing task, writes the result to the temporary table, the query results from the temporary table, weakness: the data is not accurate,

CodePudding user response:

Application request, to do the kind of display effect is similar to the movie, actually was prepared using the incremental model, but don't let use, chief technology officer said to use query directly, but they add up all the data source data volume has more than 10 billion, but also control within half an hour,

CodePudding user response:

Change the technical director of
  • Related