# In memory datasources and sort,find

**URL:** <https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295>\
**Category:** Classic Servoy\
**Created:** [June 9, 2017, 1:55pm UTC](https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295 "2017-06-09T13:55:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![developers10](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@developers10](https://forum.servoy.com/u/developers10)\
**Post date:** [June 9, 2017, 1:55pm UTC](https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295/1 "2017-06-09T13:55:35Z")

</div>

Hi,

Servoy 8 and NG clients scenario.

When we use a dataset to create a custom datasource or foundset, Find and Sort operations still can be performed on that foundset.  
In the server-log, we see that the Sort and Find instructions are executed on a MEM\_… table. (not the same name as the in memory datasource which always start with ‘mem:…’)

Now we are wondering if this is a temporary table on the Sql-backend and if so, if the data is pushed to the sql again in order to fill the temptable,  
or if this Sort and Find is taking place in local storage ?  
Or stil lanother mechanism maybe?

We would like to know because if the data is pushed to the server again each time, this could take to much time ?  
Thank you

---

<div class="post-metadata">

**Author:** ![sdevlin](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/sdevlin/32/4488_2.png) [@sdevlin](https://forum.servoy.com/u/sdevlin)\
**Post date:** [June 9, 2017, 2:11pm UTC](https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295/2 "2017-06-09T14:11:34Z")

</div>

Hi,

It’s not exactly clear is your concern here ? Performance of the mem data source ? Did you experienece a problem? Is so, can you elaborate ?  
The table is truly in-memory, there is no paging or I/O going on here.  
The runtime name of the table is not the same as the URI for the data source as it’s shown in the IDE.

---

<div class="post-metadata">

**Author:** ![developers10](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@developers10](https://forum.servoy.com/u/developers10)\
**Post date:** [June 9, 2017, 2:18pm UTC](https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295/3 "2017-06-09T14:18:30Z")

</div>

Hi Sean,

Our concern was that the data was pushed back to a ‘real’ temptable on the sqlserver where the sort and find were performed after which the data is queried back to the client.  
But I understand from yoru answer this is not the case?  
So which mechanism does the Find and Sort in memory then, the incorporated Hibernate ?

Thx

---

<div class="post-metadata">

**Author:** ![sdevlin](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/sdevlin/32/4488_2.png) [@sdevlin](https://forum.servoy.com/u/sdevlin)\
**Post date:** [June 9, 2017, 2:22pm UTC](https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295/4 "2017-06-09T14:22:58Z")

</div>

Hi,

It’s using [HSQLDB](http://hsqldb.org/), a pure java, in-mem database

---

<div class="post-metadata">

**Author:** ![developers10](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@developers10](https://forum.servoy.com/u/developers10)\
**Post date:** [June 9, 2017, 2:27pm UTC](https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295/5 "2017-06-09T14:27:57Z")

</div>

Thank you ![;-)]( "Wink")

---

<div class="post-metadata">

**Author:** ![developers10](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@developers10](https://forum.servoy.com/u/developers10)\
**Post date:** [June 9, 2017, 2:31pm UTC](https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295/6 "2017-06-09T14:31:01Z")

</div>

Forgot to ask, is the HSQLDB executed server side or client side?

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [June 11, 2017, 10:32am UTC](https://forum.servoy.com/t/in-memory-datasources-and-sort-find/19295/7 "2017-06-11T10:32:04Z")

</div>

As far as I know it’s all server side but it’s divided PER session. So you can’t share tables between sessions.

Hope this helps.
