Answer the question
In order to leave comments, you need to log in
Fast alternative to COUNT(*)?
Now I use SELECT COUNT(*) СложныйЗапрос
COUNT (*) predictably slows down. How to speed it up without big edits?
Arrange options:
1. Return an approximate amount
2. Return COUNT (*) for the first 1000 elements. They say that there are so many files falling under the condition in the database
SELECT COUNT(*) FROM files t1
WHERE NOT EXISTS (SELECT 1
FROM files t2
WHERE t1."Number" = t2."Number" AND
t1."docDate" < t2."docDate"
)
AND t1.status IS NULL
AND t1.section_name='Users' AND t1.status IS NULL
Answer the question
In order to leave comments, you need to log in
It was yesterday!
How to quickly count the number of records in a table with a billion records without an index?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question