CockroachDB TIL: Volume 7

This is my series of articles covering short "today I learned" topics as I work with CockroachDB. Read the previous installments: 


Topic 1: Show Last Query Statistics

CockroachDB has a very user-friendly and helpful UI called DB Console. I like to refer to it when I debug query performance. There is a very useful Statements page that shows a statement overview and explains plans and execution stats.

Build a Query in MuleSoft With Optional Parameters

In this tutorial we will see how to:

  • Define a RAML API specification to search products in a catalog database
  • Establish and configure a database connection to query a MySQL database
  • Build a query to support multiple optional filters
  • Add optional sorting capabilities to our query at DB level

1. Define the RAML of a Search API

Imagine that you want to create a MuleSoft API to search products inside a catalog. This API will need to accept multiple filter parameters and an optional sorting parameter. All these parameters can be optional and will be used to generate a dynamic query to search products in your catalog database.

How Milvus Balances Query Load Across Nodes

In previous blog articles, we have successively introduced the deletion, bitset, and compaction functions in Milvus 2.0. To culminate this series, we would like to share the design behind load balance, a vital function in the distributed cluster of Milvus.

Usage

Milvus 2.0 supports automatic load balance by default. But you can still trigger load balance manually. Please note that only sealed segments can be transferred across query nodes.

How to Implement Typeahead Search with Elasticsearch

Today, search is an important functionality in enterprise applications and end-users are obsessed with the experience of Google Search and expecting the application search also provides similar experiences.

This requires us to design and implement a search engine along with your golden source (RDBMS/NOSQL). There are many search engines available in the market today like Elasticsearch, Apache Solr, Azure Cognitive Search, etc. These provide a better search experience and features like typeahead, fuzzy search, boosting the search results based on relevancy, similarity search, etc.

Tutorial: How to Run SQL Queries With Presto on Amazon Redshift

Presto has evolved into a unified SQL engine on top of cloud data lakes for both interactive queries as well as batch workloads with multiple data sources. This tutorial will show how to run SQL queries with Presto (running on Kubernetes) on AWS Redshift.

Presto's Redshift connector allows querying the data stored in an external Amazon Redshift cluster. This can be used to join data between different systems like Redshift and Hive, or between two different Redshift clusters. 

Assembling a Query Optimizer with Apache Calcite

Introduction

Apache Calcite is a dynamic data management framework with SQL parser, optimizer, executor, and JDBC driver.

Many examples of Apache Calcite usage demonstrate the end-to-end execution of queries using JDBC driver, some built-in optimization rules, and the Enumerable executor. Our customers often have their own execution engines and JDBC drivers. So how to use Apache Calcite for query optimization only, without its JDBC driver and Enumerable executor?

How to Accelerate Application Performance With Smart SQL Queries

Why So Many Performance Issues Are Caused by the Database

We often forget that each request is not independent of other requests. If one request is slow, it’s unlikely to affect the others… right?

The database is a shared resource used by all processes that runs in your application. Even just one poorly designed access can hurt the performance of the whole system.

Main Uses for Couchbase Primary Index

 FROM customer USE KEYS ["cx:123"] Couchbase is a distributed database. It supports a flexible data model using JSON. Each document in a bucket will have a user-generated unique document key. This uniqueness is enforced during the insertion or updation of the data. Here’s an example document.

select meta().id, travel
from `travel-sample` travel
where type = 'airline' limit 1;
[
  {
      "id": "airline_10",
      "travel": {
          "callsign": "MILE-AIR",
          "country": "United States",
          "iata": "Q5",
          "icao": "MLA",
          "id": 10,
          "name": "40-Mile Air",
          "type": "airline"
          }
      }
  ]



INSERT INTO customer (key, value) VALUES(“cx:123”, {“name”:”joe”, “zip”: 94040, “state”:ca});

SELECT META().id FROM customer;

cx:123