#community-help

String vs Integer Indexing Performance

TLDR TJ inquired about performance differences between string and integer indexing. Jason explained it depends on the intended use of the field.

Powered by Struct AI
3
8mo
Solved
Join the chat
Mar 23, 2023 (8 months ago)
TJ
Photo of md5-3afef4cc9e9291f4f991a88147c78384
TJ
08:19 PM
Hello, is there any performance difference in searches when indexing a field as a string vs indexing it as an integer? I believe I saw a comment on a Github issue that string fields perform better but I can't find it
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:02 PM
It depends on how you want to use the field…

If you want to do full-text search on it (using the query_by parameter), indexing it as a string is the only option.
TJ
Photo of md5-3afef4cc9e9291f4f991a88147c78384
TJ
10:34 PM
got it, ty