The Shastra of Macrometa - Download the eBook

What are Queries?

Queries are one of the fundamental concepts in computer programming and database management. They are essentially commands given to a computer program or a database system to retrieve or modify specific pieces of data. A query can be thought of as a request for information from a database.

Search and retrieve data

Queries are used to search and retrieve data from a database based on certain criteria. This is typically done using a query language, such as SQL (Structured Query Language) which is the most widely used language for querying databases.

Calculations and manipulation queries

Queries can be used to retrieve all records from a database or a subset of records that meet certain criteria, such as records that match a specific value in a certain field. Queries can also be used to perform calculations on data or to join data from multiple tables in a database.

In addition to retrieving data, queries can also be used to update, insert, or delete records in a database. These types of queries are known as data manipulation queries and are used to modify the content of a database.

Variety of applications and industry use cases

Queries can be simple or complex depending on the requirements of the task at hand. Simple queries may only require a single table and a few criteria, while more complex queries may involve multiple tables and complex criteria. Queries are used in a wide variety of applications and industries, including e-commerce, healthcare, finance, and more. They are an essential tool for managing and analyzing large amounts of data and are used to make informed decisions based on that data.

Query optimization

Query optimization is an important aspect of managing queries. It involves improving the performance of a query by optimizing its execution plan. This can be done by analyzing the query and the underlying database schema to identify areas for improvement, such as indexing certain fields or restructuring the database schema to better support the query. Query optimization is critical for improving the performance of applications that rely on queries, as it can significantly reduce the time it takes to retrieve data from a database.

Macrometa Query Workers

A Macrometa Query Worker is a set of named, parameterized C8QL or SQL queries stored in the Global Data Network (GDN) that you can run from a dedicated REST endpoint. The query worker is created automatically globally and is available from the region closest to the user.

Query workers can be created and updated using the Macrometa GDN web console, CLI, SDK, or by using the REST API directly. Each query worker is tied to a specific query text and parameter set.

Each query worker is exposed as its own endpoint and is protected. The query workers are organized by GeoFabric, enabling you to have different query workers for different geo-regions as well as for different fabrics within the same region.


Overall, queries are an essential part of database management and data analysis. They provide a powerful way to search and retrieve data from a database, and they enable users to make informed decisions based on that data.


Global Data Network
Join the Newsletter