Specifies whether the database always count the number of rows in a query when it is opened.
On, Off
Off
PUBLIC role | For current user | For other users | |
---|---|---|---|
Allowed to set permanently? | Yes, with SET ANY PUBLIC OPTION | Yes | Yes, with SET ANY PUBLIC OPTION |
Allowed to set temporarily? | Yes, with SET ANY PUBLIC OPTION | Yes (current connection only) | No |
If this option is set to Off, the row count is usually only an estimate. If this option is set to On, the row count is always accurate.
When row_counts is set to On, it may take significantly longer to execute queries. In fact, it usually causes the database server to execute the query twice, doubling the execution time.