# Long search delay

**URL:** <https://community.datagerry.com/t/long-search-delay/629>\
**Category:** Report a Bug\
**Created:** [July 15, 2024, 11:39am UTC](https://community.datagerry.com/t/long-search-delay/629 "2024-07-15T11:39:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![avorr](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@avorr](https://community.datagerry.com/u/avorr)\
**Post date:** [July 15, 2024, 11:39am UTC](https://community.datagerry.com/t/long-search-delay/629/1 "2024-07-15T11:39:31Z")

</div>

Hello!  
I have more than 20000 objects in DataGerry.  
Search delay is more than 20 seconds, sometimes more than 1 minute.

---

<div class="post-metadata">

**Author:** ![adnan.smajic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.datagerry.com/adnan.smajic/32/754_2.png) [@adnan.smajic](https://community.datagerry.com/u/adnan.smajic)\
**Post date:** [July 17, 2024, 6:40am UTC](https://community.datagerry.com/t/long-search-delay/629/2 "2024-07-17T06:40:07Z")

</div>

Hi @avorr,  
this is a known issue (many objects have a long delay) which will be fixed in the future as part of the API and Frontend optimization tasks.

BR Adnan

---

<div class="post-metadata">

**Author:** ![avorr](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@avorr](https://community.datagerry.com/u/avorr)\
**Post date:** [July 18, 2024, 10:24am UTC](https://community.datagerry.com/t/long-search-delay/629/3 "2024-07-18T10:24:49Z")

</div>

Please tell me approximately when will this be?

---

<div class="post-metadata">

**Author:** ![ozzy](https://avatars.discourse-cdn.com/v4/letter/o/b5e925/32.png) [@ozzy](https://community.datagerry.com/u/ozzy)\
**Post date:** [October 19, 2024, 3:58pm UTC](https://community.datagerry.com/t/long-search-delay/629/4 "2024-10-19T15:58:55Z")

</div>

Hello @adnan.smajic,

At the moment, this issue (long delays with a large number of objects) prevents DataGerry from being used as a fully-fledged enterprise solution. Is there hope that this problem will be resolved in the next release?

---

<div class="post-metadata">

**Author:** ![adnan.smajic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.datagerry.com/adnan.smajic/32/754_2.png) [@adnan.smajic](https://community.datagerry.com/u/adnan.smajic)\
**Post date:** [October 23, 2024, 11:42am UTC](https://community.datagerry.com/t/long-search-delay/629/5 "2024-10-23T11:42:06Z")

</div>

Hi @avorr,  
could you provide us the Type in which you are using MDS? So we have a good example the speed optimize on.

BR Adnan

---

<div class="post-metadata">

**Author:** ![ozzy](https://avatars.discourse-cdn.com/v4/letter/o/b5e925/32.png) [@ozzy](https://community.datagerry.com/u/ozzy)\
**Post date:** [October 29, 2024, 4:42pm UTC](https://community.datagerry.com/t/long-search-delay/629/6 "2024-10-29T16:42:45Z")

</div>

[MDS\_Type.txt](https://community.datagerry.com/uploads/short-url/cmFRQk3SsIUzLdmbsrTdadnNsCf.txt) (8.3 KB)

@adnan.smajic

---

<div class="post-metadata">

**Author:** ![adnan.smajic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.datagerry.com/adnan.smajic/32/754_2.png) [@adnan.smajic](https://community.datagerry.com/u/adnan.smajic)\
**Post date:** [October 30, 2024, 8:39am UTC](https://community.datagerry.com/t/long-search-delay/629/7 "2024-10-30T08:39:42Z")

</div>

Thank you very much!

BR Adnan

---

<div class="post-metadata">

**Author:** ![acpfn](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@acpfn](https://community.datagerry.com/u/acpfn)\
**Post date:** [November 6, 2024, 4:22pm UTC](https://community.datagerry.com/t/long-search-delay/629/8 "2024-11-06T16:22:30Z")

</div>

Same issue here: adding new objects in a class where we have two references to other classes makes the global search unusable (the response time, which is immediate, suddenly increases to more than 1 minute)

---

<div class="post-metadata">

**Author:** ![acpfn](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@acpfn](https://community.datagerry.com/u/acpfn)\
**Post date:** [November 7, 2024, 4:01pm UTC](https://community.datagerry.com/t/long-search-delay/629/9 "2024-11-07T16:01:06Z")

</div>

After investigation, I found out that DataGerry creates only one single index in the MongoDB database. Therefore when reaching a certain size, the performance starts being really poor on some queries.  
I have therefore created two indexes in our MongoDB:

- one on public\_id, which is used everywhere in references
- one on fields.value, which is used in attributes.  
The result is incredible as searches are now responding within 1 sec most of the time.

---

<div class="post-metadata">

**Author:** ![adnan.smajic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.datagerry.com/adnan.smajic/32/754_2.png) [@adnan.smajic](https://community.datagerry.com/u/adnan.smajic)\
**Post date:** [November 13, 2024, 8:38am UTC](https://community.datagerry.com/t/long-search-delay/629/10 "2024-11-13T08:38:25Z")

</div>

Hi @acpfn ,  
thanks for the feedback, we will have a look at it.

BR Adnan
