Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding page for CBO #24736

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Adding page for CBO #24736

wants to merge 7 commits into from

Conversation

premkumr
Copy link
Contributor

@premkumr premkumr commented Oct 30, 2024

@netlify /preview/architecture/query-layer/planner-optimizer
DOC-383

Copy link

netlify bot commented Oct 30, 2024

Deploy Preview for infallible-bardeen-164bc9 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3693b70
🔍 Latest deploy log https://app.netlify.com/sites/infallible-bardeen-164bc9/deploys/672404996affee00084961d0
😎 Deploy Preview https://deploy-preview-24736--infallible-bardeen-164bc9.netlify.app/preview/architecture/query-layer/planner-optimizer
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.


### Index scan

As the primary key is part of the base table and that each [SST](../../docdb/lsm-sst) of the base table is sorted in the order of the primary key the primary index lookup cheaper compared to secondary index lookup. Depending on the type of query this distinction is considered.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix this paragraph, it's a bit incomprehensible

@gauravk-in
Copy link
Contributor

It generates various plans of execution and determines the optimal path by taking into consideration the costs associated various factors like index lookups, scans, CPU usage, network latency, and so on.

Is missing ... costs associated *with* various factors...

Could also be rephrased as,

It computes the cost of various execution plans by taking into consideration factors such as index lookup, CPU usage, network throughput, and so on and picks the plan with the cheapest cost.

@gauravk-in
Copy link
Contributor

The primary component that calculates these values is the cost-based optimizer (CBO).

can be

The query planner, also known as CBO comprises primarily of selectivity estimation and cost modeling. We have implemented a new cost model for YugabyteDB which improves the accuracy of the CBO. This can be enabled as follows,

@gauravk-in
Copy link
Contributor

These statistics are essential for estimating the costs of various query plans accurately.

can be

These statistics are essential for estimating the selectivity of filters and costs of various query plans accurately.

@gauravk-in
Copy link
Contributor

To estimate the cost of fetching a tuple from DocDB, factors such as the number of SST files that may need to be read, and the estimated number of seeks, previous, and next operations that may be executed in the LSM subsystem, are taken into account.

can be

To estimate the cost of fetching a tuple from DocDB, we take into account factors such as the number of SST files that may need to be read, and the estimated number of seeks, previous, and next operations that may be executed in the LSM subsystem.

@ddhodge
Copy link
Contributor

ddhodge commented Oct 31, 2024

To estimate the cost of fetching a tuple from DocDB, we take into account factors such as the number of SST files that may need to be read, and the estimated number of seeks, previous, and next operations that may be executed in the LSM subsystem.

'we' - you mean the CBO? eg "the CBO takes into account..."

@ddhodge
Copy link
Contributor

ddhodge commented Oct 31, 2024

The query planner, also known as CBO comprises primarily of selectivity estimation and cost modeling. We have implemented a new cost model for YugabyteDB which improves the accuracy of the CBO. This can be enabled as follows,

Oh so the query planner and the CBO are the same?
How should we distinguish the new CBO from the old (PostgreSQL?) CBO?
What is 'selectivity estimation' and 'selectivity of filters'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation needed
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants