# Adding and Removing Indexes in MongoDB Atlas

**URL:** <https://forum.pritunl.com/t/adding-and-removing-indexes-in-mongodb-atlas/2430>\
**Category:** Pritunl\
**Created:** [September 26, 2024, 3:52pm UTC](https://forum.pritunl.com/t/adding-and-removing-indexes-in-mongodb-atlas/2430 "2024-09-26T15:52:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Latorre](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/l/b5ac83/32.png) [@Latorre](https://forum.pritunl.com/u/Latorre)\
**Post date:** [September 26, 2024, 3:52pm UTC](https://forum.pritunl.com/t/adding-and-removing-indexes-in-mongodb-atlas/2430/1 "2024-09-26T15:52:07Z")

</div>

Good morning!  
I have a question.  
I am using MongoDB Atlas in my environments, and recently I received a suggestion to add two more indexes and remove indexes that haven’t been used for over 21 days. This change aims to improve performance for new searches on MongoDB. Is this a good idea? Or is there a chance it could break anything?

- List of indexes recommended for addition:

Collection pritunl-vpn. **servers\_output:**  
**{**  
server\_id: 1  
timestamp: -1  
}Collection pritunl-vpn. **hosts\_usage:**  
**{**  
host\_id: 1  
period: 1  
timestamp: 1  
**}**

- List of indexes recommended for removal:

pritunl-vpn. **users**  
Index Name: last\_active\_1\_name\_1  
{  
last\_active: 1  
name: 1  
}pritunl-vpn. **organizations**  
Index Name: auth\_token\_1  
{  
auth\_token: 1  
}pritunl-zero. **users**  
Index Name: roles\_1  
{  
roles: 1  
}pritunl-zero. **users**  
Index Name: token\_1  
{  
token: 1  
}pritunl-zero. **events**  
Index Name: channel\_1  
{  
channel: 1  
}pritunl-vpn. **users\_audit**  
Index Name: timestamp\_-1  
{  
timestamp: -1  
}pritunl-vpn. **clients**  
Index Name: domain\_1  
{  
domain: 1  
}pritunl-vpn. **clients**  
Index Name: virt\_address\_num\_1  
{  
virt\_address\_num: 1  
}pritunl-vpn. **queue**  
Index Name: runner\_id\_1  
{  
runner\_id: 1  
}pritunl-vpn. **queue**  
Index Name: ttl\_timestamp\_1  
{  
ttl\_timestamp: 1  
}pritunl-vpn. **links\_hosts**  
Index Name: link\_id\_1  
{  
link\_id: 1  
}pritunl-vpn. **links\_hosts**  
Index Name: location\_id\_1\_status\_1\_active\_1\_priority\_-1  
{  
location\_id: 1  
status: 1  
active: 1  
priority: -1  
}pritunl-vpn. **links\_hosts**  
Index Name: location\_id\_1\_static\_1  
{  
location\_id: 1  
static: 1  
}pritunl-vpn. **links\_hosts**  
Index Name: location\_id\_1\_name\_1  
{  
location\_id: 1  
name: 1  
}pritunl-vpn. **links\_hosts**  
Index Name: ping\_timestamp\_ttl\_1  
{  
ping\_timestamp\_ttl: 1  
}pritunl-zero. **policies**  
Index Name: authorities\_1  
{  
authorities: 1  
}

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [September 27, 2024, 4:26am UTC](https://forum.pritunl.com/t/adding-and-removing-indexes-in-mongodb-atlas/2430/2 "2024-09-27T04:26:10Z")

</div>

I will look into adding those indexes but if the indexes are modified manually the Pritunl host will restore them and remove unknown indexes when the service is started again.

---

<div class="post-metadata">

**Author:** ![Latorre](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/l/b5ac83/32.png) [@Latorre](https://forum.pritunl.com/u/Latorre)\
**Post date:** [September 30, 2024, 6:16pm UTC](https://forum.pritunl.com/t/adding-and-removing-indexes-in-mongodb-atlas/2430/3 "2024-09-30T18:16:05Z")

</div>

Thanks Zach!
