postgresql - Best way to get the count of data in big data table using SQL -


i have table 12 millions of data , want count of data matches criteria. table indexed , when want test worst case of count of records in table take hours data using

select count(id)  big_table  date > xxx     , date < yyy 

does have better idea count in java using sql?


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -