The ANALYZE command

You can use the ANALYZE command to gather statistics for Hadoop and HBase tables. These statistics are used by the Db2® Big SQL optimizer to determine the most optimal access plans to efficiently process your queries. The more statistics that you collect on your tables, the better decisions the optimizer can make to provide the best possible access plans. When you run ANALYZE on a table to collect these statistics, the query generally runs faster.

You can use the auto-analyze feature to automatically determine whether a table should be analyzed. If you add new data, or if you have never run the ANALYZE command against a table, auto-analyze schedules an analyze operation. For more information, see Auto-analyze.