surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.03k stars 73 forks source link

Do not scan tables when clicking on them #262

Closed ioannist closed 1 month ago

ioannist commented 2 months ago

Describe your feature request When clicking on the table, surrealist seems to be scanning all records. This is problematic for large databases with over 100K pages. In many cases, we have to restart surrealist and even surrealdb itself due to the volume of the request. Instead, you could put a default LIMIT, either in terms of records or request time, and end your pagination with ....

Are you willing to contribute this feature? No

sourabpramanik commented 1 month ago

@ioannist Surrealist does have a default limit of 25. It will not query for more than 25 records unless specified otherwise

kearfy commented 1 month ago

@sourabpramanik while that is true, I believe @ioannist here is affected by the query that retrieves the total table count. On SurrealDB's side, we're still improving these kind of queries, I'm not sure how we can best improve this scenario at the moment, but we'll have a think about it!

ioannist commented 1 month ago

Thanks. Sometimes, I've also noticed that if you click on (large) table A and then immediately on (small) table B, you will get table B and then, after a while, table A will load and replace it. This is a separate issue but also related to big tables.