near / near-indexer-for-explorer

Watch NEAR network and store all the data from NEAR blockchain to PostgreSQL database
https://near-indexers.io/docs/projects/near-indexer-for-explorer
GNU General Public License v3.0
123 stars 56 forks source link

SQL timeouts for various queries on mainnet DB #319

Closed singulart closed 1 year ago

singulart commented 1 year ago

Example query that fails to return data due to timeout:

select count from transactions where block_timestamp > 1666656000;

Error message: canceling statement due to statement timeout

telezhnaya commented 1 year ago

Hey @singulart , Public read-only replica has huge load and it's not intended for heavy requests. count(*) usually requires sufficient resources.

If you want to find the number of transactions after a specific date, you can use NEAR Analytics instead.

singulart commented 1 year ago

Thanks a lot for your support! I will try near analytics!