How to speed up the counting of all lines in PostgreSQL v9.3.11?
The main WHERE that WHERE supported.
Now download speed: 2.9424 sec. (324477 records)
Request :
SELECT COUNT("my_field") FROM "mytable"; I already looked at estimate , and creating a table to write count rows through INSERT + DELETE triggers. But all this does not fit, since there must be a sorting on the page, so WHERE important, and in the estimate and other methods I do not know how to use it.
Please tell me how to speed up the counting of rows in the table, taking into account the WHERE ?