You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECTr.nameas region, count(c.id)
FROMcore.regions r
LEFT JOINcore.projects p ON (r.name=p.region)
LEFT JOINcore.clusters c ON (c.project_id=p.id)
WHERE (c.is_deleted is nullorc.is_deleted= false)
ANDr.name NOT LIKE'%.edge'GROUP byr.namelimit100;
Takes anywhere from 5 to 20 seconds.
All 3 tables have < 500 entries.
EXPLAIN
Eval[name AS region, count(id)]
└ Limit[100::bigint;0]
└ GroupHashAggregate[name | count(id)]
└ Filter[((is_deleted IS NULL) OR (is_deleted = false))]
└ NestedLoopJoin[LEFT | (project_id = id)]
├ NestedLoopJoin[RIGHT | (name = region)]
│ ├ Rename[region, id] AS p
│ │ └ Collect[core.projects | [region, id] | true]
│ └ Rename[name] AS r
│ └ Collect[core.regions | [name] | (NOT (name LIKE '%.edge'))]
└ Rename[id, is_deleted, project_id] AS c
└ Collect[core.clusters | [id, is_deleted, project_id] | true]
Steps to Reproduce
CREATETABLEIF NOT EXISTS "core"."regions" (
"description"TEXT,
"name"TEXT,
"agent_url"TEXT,
"prometheus_url"TEXT,
"basic_auth_password"TEXT,
"organization_id"TEXT,
"aws_region"TEXT,
"aws_bucket"TEXT,
"deprecated"BOOLEAN,
"provider"TEXT,
"status"TEXT,
"last_seen"TIMESTAMP WITH TIME ZONE,
"dc" OBJECT(STRICT) AS (
"created"TIMESTAMP WITH TIME ZONE,
"modified"TIMESTAMP WITH TIME ZONE
),
"cert_type"TEXT,
PRIMARY KEY ("name")
)
CLUSTERED BY ("name") INTO 1 SHARDS
WITH (
"allocation.max_retries"=5,
"blocks.metadata"= false,
"blocks.read"= false,
"blocks.read_only"= false,
"blocks.read_only_allow_delete"= false,
"blocks.write"= false,
codec ='default',
column_policy ='strict',
"mapping.total_fields.limit"=1000,
max_ngram_diff =1,
max_shingle_diff =3,
number_of_replicas ='1',
refresh_interval =1000,
"routing.allocation.enable"='all',
"routing.allocation.total_shards_per_node"=-1,
"store.type"='fs',
"translog.durability"='REQUEST',
"translog.flush_threshold_size"=536870912,
"translog.sync_interval"=5000,
"unassigned.node_left.delayed_timeout"=60000,
"warmer.enabled"= true,
"write.wait_for_active_shards"='1'
)
CrateDB version
4.6.4
CrateDB setup information
Number of nodes: 3
Heap: 4gb
CPU Cores: 2
Observed behavior
Takes anywhere from 5 to 20 seconds.
All 3 tables have < 500 entries.
EXPLAIN
Steps to Reproduce
The text was updated successfully, but these errors were encountered: