Overrides the internal rowcount for a table or view. This is a global setting, and will affect all users and all sessions for this system.

Syntax

ALTER METADATA ON objectName
{ SET | DROP } OPTIONS [ ( key 'value' ) ] ;

Arguments

  • objectName: The fully-qualified name of an existing table or view.

  • key: They option key. Use ROWCOUNT.

  • value: The number of rows (BIGINT). This must be zero or a positive integer.

Additional Information

  • rowcount is used by the query optimizer to determine optimal data movements.
  • Use system tables to see the rowcount on tables and views; e.g.,
SELECT * FROM SYS.CIRROTABLES;
SELECT * FROM SYS.CIRROVIEWS;

Examples

-- Set the rowcount for a table or view to 1,000 rows
ALTER METADATA ON MYSQL1.inventory.inventory.cust SET OPTIONS ( ROWCOUNT '1000' );
 
-- Drop the rowcount for a table or view by specifying the ROWCOUNT key
ALTER METADATA ON MYSQL1.inventory.inventory.cust DROP OPTIONS ( ROWCOUNT );
 
-- Drop the rowcount for a table or view by dropping all options
ALTER METADATA ON MYSQL1.inventory.inventory.cust DROP OPTIONS;