Learning GraphQL Query Costs (Extended Version)
- URL: http://arxiv.org/abs/2108.11139v2
- Date: Thu, 26 Aug 2021 21:12:17 GMT
- Title: Learning GraphQL Query Costs (Extended Version)
- Authors: Georgios Mavroudeas and Guillaume Baudart and Alan Cha and Martin
Hirzel and Jim A. Laredo and Malik Magdon-Ismail and Louis Mandel and Erik
Wittern
- Abstract summary: We propose a machine-learning approach to efficiently and accurately estimate the query cost.
Our framework is efficient and predicts query costs with high accuracy, consistently outperforming the static analysis by a large margin.
- Score: 7.899264246319001
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: GraphQL is a query language for APIs and a runtime for executing those
queries, fetching the requested data from existing microservices, REST APIs,
databases, or other sources. Its expressiveness and its flexibility have made
it an attractive candidate for API providers in many industries, especially
through the web. A major drawback to blindly servicing a client's query in
GraphQL is that the cost of a query can be unexpectedly large, creating
computation and resource overload for the provider, and API rate-limit overages
and infrastructure overload for the client. To mitigate these drawbacks, it is
necessary to efficiently estimate the cost of a query before executing it.
Estimating query cost is challenging, because GraphQL queries have a nested
structure, GraphQL APIs follow different design conventions, and the underlying
data sources are hidden. Estimates based on worst-case static query analysis
have had limited success because they tend to grossly overestimate cost. We
propose a machine-learning approach to efficiently and accurately estimate the
query cost. We also demonstrate the power of this approach by testing it on
query-response data from publicly available commercial APIs. Our framework is
efficient and predicts query costs with high accuracy, consistently
outperforming the static analysis by a large margin.
Related papers
- GraphQL Adoption and Challenges: Community-Driven Insights from StackOverflow Discussions [1.3999481573773076]
API is a query language and web application programming interface (API) for client-server architecture.
Our results indicate that Client and Server are the top two architectural layers attracting discussion on SO.
arXiv Detail & Related papers (2024-08-15T18:08:13Z) - UQE: A Query Engine for Unstructured Databases [71.49289088592842]
We investigate the potential of Large Language Models to enable unstructured data analytics.
We propose a new Universal Query Engine (UQE) that directly interrogates and draws insights from unstructured data collections.
arXiv Detail & Related papers (2024-06-23T06:58:55Z) - Database-Augmented Query Representation for Information Retrieval [59.57065228857247]
We present a novel retrieval framework called Database-Augmented Query representation (DAQu)
DAQu augments the original query with various (query-related) metadata across multiple tables.
We validate DAQu in diverse retrieval scenarios that can incorporate metadata from the relational database.
arXiv Detail & Related papers (2024-06-23T05:02:21Z) - PixelsDB: Serverless and Natural-Language-Aided Data Analytics with Flexible Service Levels and Prices [16.104672530595483]
PixelsDB is an open-source data analytic system that allows users to explore data efficiently.
It allows users to generate and debugsql queries using a natural language interface powered by fine-tuned language models.
The queries are then executed by a serverless query engine that offers varying prices for different service levels on query urgency.
arXiv Detail & Related papers (2024-05-30T07:48:43Z) - A Solution-based LLM API-using Methodology for Academic Information Seeking [49.096714812902576]
SoAy is a solution-based LLM API-using methodology for academic information seeking.
It uses code with a solution as the reasoning method, where a solution is a pre-constructed API calling sequence.
Results show a 34.58-75.99% performance improvement compared to state-of-the-art LLM API-based baselines.
arXiv Detail & Related papers (2024-05-24T02:44:14Z) - NL2KQL: From Natural Language to Kusto Query [1.7931930942711818]
NL2KQL is an innovative framework that uses large language models (LLMs) to convert natural language queries (NLQs) to Kusto Query Language (KQL) queries.
To validate NL2KQL's performance, we utilize an array of online (based on query execution) and offline (based on query parsing) metrics.
arXiv Detail & Related papers (2024-04-03T01:09:41Z) - Budget-aware Query Tuning: An AutoML Perspective [14.561951257365953]
Modern database systems rely on cost-based querys to come up with good execution plans for input queries.
We show that by varying the costunit values one can obtain query plans that significantly outperform the default query plans.
arXiv Detail & Related papers (2024-03-29T20:19:36Z) - Neural Graph Reasoning: Complex Logical Query Answering Meets Graph
Databases [63.96793270418793]
Complex logical query answering (CLQA) is a recently emerged task of graph machine learning.
We introduce the concept of Neural Graph Database (NGDBs)
NGDB consists of a Neural Graph Storage and a Neural Graph Engine.
arXiv Detail & Related papers (2023-03-26T04:03:37Z) - Forecasting SQL Query Cost at Twitter [2.124552987084511]
Service employs machine learning techniques to train models from historical query request logs.
Models can achieve 97.9% accuracy for CPU usage prediction and 97% accuracy for memory usage prediction.
arXiv Detail & Related papers (2022-04-12T05:08:30Z) - Graph Enhanced BERT for Query Understanding [55.90334539898102]
query understanding plays a key role in exploring users' search intents and facilitating users to locate their most desired information.
In recent years, pre-trained language models (PLMs) have advanced various natural language processing tasks.
We propose a novel graph-enhanced pre-training framework, GE-BERT, which can leverage both query content and the query graph.
arXiv Detail & Related papers (2022-04-03T16:50:30Z) - Learning Query Expansion over the Nearest Neighbor Graph [94.80212602202518]
Graph Query Expansion (GQE) is presented, which is learned in a supervised manner and performs aggregation over an extended neighborhood of the query.
The technique achieves state-of-the-art results over known benchmarks.
arXiv Detail & Related papers (2021-12-05T19:48:42Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.