nerdexam
Oracle

1Z0-888 · Question #72

Which two methods will provide the total number of partitions on a table? (Choose two.)

The correct answer is A. Query the INFORMATION_SCHEMA.PARTITIONS table. Note: This question asks to "choose two," but only option A is listed as correct - this appears to be an incomplete answer key. The most likely intended second answer is E (SHOW CREATE TABLE), though it's less precise than A. --- INFORMATION_SCHEMA.PARTITIONS is the definitive…

MySQL Architecture

Question

Which two methods will provide the total number of partitions on a table? (Choose two.)

Options

  • AQuery the INFORMATION_SCHEMA.PARTITIONS table
  • BUse the command: SHOW TABLE STATUS
  • CQuery the performance_schema.objects_summary_global_by_type table
  • DQuery the INFORMATION_SCHEMA.TABLES table for the partition_count
  • EUse the command: SHOW CREATE TABLE

How the community answered

(35 responses)
  • A
    91% (32)
  • B
    3% (1)
  • E
    6% (2)

Explanation

Note: This question asks to "choose two," but only option A is listed as correct - this appears to be an incomplete answer key. The most likely intended second answer is E (SHOW CREATE TABLE), though it's less precise than A.


INFORMATION_SCHEMA.PARTITIONS is the definitive source for partition metadata in MySQL - you can run SELECT COUNT(*) FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 'mytable' to get an exact partition count per table, making A unambiguously correct.

B (SHOW TABLE STATUS) is wrong because it returns general table metadata (engine, row count, size) but does not include a partition count column.

C (performance_schema.objects_summary_global_by_type) is wrong because that view aggregates performance/wait statistics by object type - it has nothing to do with partition definitions.

D (INFORMATION_SCHEMA.TABLES for partition_count) is a trap - INFORMATION_SCHEMA.TABLES has no partition_count column; the column simply doesn't exist there.

E (SHOW CREATE TABLE) shows the DDL including partition clauses, so you can manually count partitions from the output, but it returns a text blob, not a queryable count - making it unreliable and not the best method.

Memory tip: Think "PARTITIONS table → partition data." The INFORMATION_SCHEMA view named after the feature is always the go-to - just as INFORMATION_SCHEMA.COLUMNS is for columns, INFORMATION_SCHEMA.PARTITIONS is for partitions.

Topics

#INFORMATION_SCHEMA#Partitioning#Table Metadata#MySQL Internals

Community Discussion

No community discussion yet for this question.

Full 1Z0-888 Practice