When search sessions by messages, it seems really slow. In one case, it took >53s for query SessionsTableQuery( to return? Is there any tips for speeding it up? My data isn't that big yet, the /settings/general pages says my data base usage is 10.2 GiB, and the search is probably just within a single project, right? The project with 53s probably has < 1G data.
It seems likely that searching sessions by message content in Phoenix can be slow, especially as data size grows, due to how the backend queries are structured and the lack of full-text indexing or optimizations for large attributes. There are known reports of slow GraphQL queries and suggestions to avoid pulling large attributes over connections, as this can significantly impact performance鈥攅ven with moderate data sizes. Some improvements have been made (e.g., reducing page size, lazy loading), but searching message content remains a bottleneck if the session or span attributes are large or not indexed for text search. My understanding is that, as of now, there are no user-configurable settings to speed up this specific search, and the slowness is a recognized limitation in the current implementation (source, source, source).Possible workarounds mentioned include limiting the size of stored messages, using previews instead of full content, or offloading large messages to blob storage and storing only references in Phoenix. There is no mention in the data sources of a direct way to enable full-text search or indexing for session messages, nor a configuration to speed up these queries in the UI or backend. Would you like more detail on the technical reasons for this slowness or on potential architectural workarounds?Sources: - github.com/Arize-ai/phoenix/issues/4006 - arize-ai.slack.com/archives/C04R3GXC8HK/p1718305854.864919 - https://github.com/Arize-ai/phoenix/pull/5204
馃挕聽Hint: Mention RunLLM in the thread for followups.
yeah, I was on sessions page like
I just typed some text on the Search messages box, the browser appears to do nothing, not returning anything till 53s later (I get the number from the chrome developer console)
the query is a short text with ~10 words
it's basically a chatbot
like LLM+a bunch of custom built tools
what's being traced is very similar to what's introduced in this course https://www.deeplearning.ai/short-courses/evaluating-ai-agents/
agent => router call => tool call => LLM calls.
Okay, so it doesn't sound like the size of the messages is particularly long.
Out of curiosity, are you using Phoenix Cloud or self-hosting?
does the search search span metadata? in the metadata, some the spans may have logged some opaque tokens (long strings)
