# Recorded DB problem

**URL:** <https://swi-prolog.discourse.group/t/recorded-db-problem/6360>\
**Category:** General\
**Created:** [March 11, 2023, 3:59pm UTC](https://swi-prolog.discourse.group/t/recorded-db-problem/6360 "2023-03-11T15:59:26Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![peter.ludemann](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/peter.ludemann/32/48_2.png) [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Post date:** [March 14, 2023, 8:18pm UTC](https://swi-prolog.discourse.group/t/recorded-db-problem/6360/16 "2023-03-14T20:18:58Z")

</div>

> [@AlexeyKosarchuk](#):
>
> So far that list contains around 300-500 terms, but in future it will be much, much more. I expect to run into troubles when scaling data up.

I have some code that needs to store 10s of thousands of terms (a global symbol table). After a few experiments, I ended up using library(rbtrees). (I didn’t try @EricGT 's suggestion of [N+K trees](https://swi-prolog.discourse.group/t/does-swi-prolog-have-n-k-trees/1310).) I also wrote some custom code to read and write them quickly, using library(fastrw).

---

_[View the full topic](https://swi-prolog.discourse.group/t/recorded-db-problem/6360)._
