Blogs›Weaviate›Query Profiling
Introduces query profiling as a per-query, opt-in debugging tool to provide detailed timing breakdowns of query execution stages (filter, vector search, object hydration, keyword scoring) across the entire cluster. This replaces the previous node-per-node slow query log for real-time, granular performance analysis. This post extends the concept of query analysis to the Model Context Protocol (MCP) server, enabling hybrid search over code and documentation for coding assistants. It details the in-query profiling feature, providing per-shard timing breakdowns for any search request by setting `query_profile=True` in `MetadataQuery`. The profile is structured per shard and per search type (`vector`, `keyword`, `object`), with metrics like `vector_search_took`, `filters_ids_matched`, `knn_search_layer_N_took`, `kwd_method`, and `total_took`. For hybrid search, you get both vector and keyword sections per shard. For multi-node clusters, the coordinator aggregates timings from every shard — each entry includes the node that executed it, making performance imbalances easy to spot. Profiling uses the same instrumentation as slow query logging, so overhead is minimal when enabled and zero when disabled.