# Serach by unique\_id Vs. username - which is faster?

**URL:** <https://forum.bubble.io/t/serach-by-unique-id-vs-username-which-is-faster/249118>\
**Category:** Database\
**Created:** [February 27, 2023, 2:12pm UTC](https://forum.bubble.io/t/serach-by-unique-id-vs-username-which-is-faster/249118 "2023-02-27T14:12:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moundir.rohmat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/moundir.rohmat/32/159513_2.png) [@moundir.rohmat](https://forum.bubble.io/u/moundir.rohmat)\
**Post date:** [February 27, 2023, 2:12pm UTC](https://forum.bubble.io/t/serach-by-unique-id-vs-username-which-is-faster/249118/1 "2023-02-27T14:12:09Z")

</div>

Hello,

I would like to know what would be faster to searching/fetching data in database, using **Username** (unique) OR **Unique\_id** (bubble native) ?

Or maybe it only depends on how may strings I have in the field I use for fetching ?

Do you have any experience with slow fetching using another field than Unique-id ?

Any advices ?

Cheers !!

---

<div class="post-metadata">

**Author:** ![kazimdgoni](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kazimdgoni/32/148445_2.png) [@kazimdgoni](https://forum.bubble.io/u/kazimdgoni)\
**Post date:** [February 27, 2023, 6:56pm UTC](https://forum.bubble.io/t/serach-by-unique-id-vs-username-which-is-faster/249118/2 "2023-02-27T18:56:19Z")

</div>

What about trying both to see which works fast.  
I think using constraints can improve the performance.

I am still learning, please share your experience here for others to find this post helpful.
