Datasets:
id string | split string | seed int64 | scenario string | phase string | template string | seq int64 | query string | sql string | params unknown | tables list | schema list | plan string | baseline_cost float64 | candidates list | label dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
train-s1-oltp_to_analytics-873 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 873 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user145486@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user145486@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user145486@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-881 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 881 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user158012@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user158012@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user158012@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-917 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 917 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user4697@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user4697@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user4697@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-927 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 927 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user126007@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user126007@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user126007@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-934 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 934 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user3802@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user3802@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user3802@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1005 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,005 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user123135@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user123135@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user123135@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1079 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,079 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user9175@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user9175@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user9175@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1092 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,092 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user13410@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user13410@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user13410@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1141 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,141 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user108051@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user108051@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user108051@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1174 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,174 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user116778@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user116778@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user116778@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1176 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,176 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user76021@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user76021@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user76021@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1252 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,252 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user113762@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user113762@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user113762@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1264 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,264 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user29995@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user29995@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user29995@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1337 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,337 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user69392@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user69392@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user69392@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-1382 | train | 1 | oltp_to_analytics | analytics | customer_by_email | 1,382 | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower('user95863@example.com') | SELECT id, tenant_id, country, is_active FROM customers WHERE lower(email) = lower(%(email)s) | {
"email": "user95863@example.com"
} | [
"customers"
] | [
"CREATE TABLE customers (id bigint NOT NULL, tenant_id integer NOT NULL, email text NOT NULL, country text NOT NULL, signup_at timestamp with time zone NOT NULL, is_active boolean NOT NULL, PRIMARY KEY (id)); -- ~200,000 rows"
] | Gather (cost=1000.00..4926.71 rows=1000 width=16)
Workers Planned: 1
-> Parallel Seq Scan on customers (cost=0.00..3826.71 rows=588 width=16)
Filter: (lower(email) = 'user95863@example.com'::text) | 4,926.71 | [
{
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
}
] | {
"ddl": "CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email)))",
"cost": 1761.86,
"reduction": 0.6424,
"size_bytes": 9863168
} |
train-s1-oltp_to_analytics-810 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 810 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 91930 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 91930
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-830 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 830 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 473 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 473
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-834 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 834 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 74068 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 74068
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-861 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 861 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 18993 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 18993
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-877 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 877 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 6510 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 6510
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-902 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 902 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 42799 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 42799
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-903 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 903 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 31069 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 31069
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-904 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 904 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 9517 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 9517
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-943 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 943 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 173139 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 173139
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-967 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 967 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 166284 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 166284
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-1018 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 1,018 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 165926 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 165926
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-1028 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 1,028 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 246 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 246
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-1037 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 1,037 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 61305 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 61305
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-1038 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 1,038 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 113967 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 113967
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-1140 | train | 1 | oltp_to_analytics | analytics | customer_recent_events | 1,140 | SELECT event_type, payload, created_at FROM events WHERE customer_id = 143707 ORDER BY created_at DESC LIMIT 50 | SELECT event_type, payload, created_at FROM events WHERE customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 50 | {
"customer_id": 143707
} | [
"events"
] | [
"CREATE TABLE events (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, event_type text NOT NULL, payload jsonb NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~2,000,008 rows"
] | Limit (cost=47138.85..47140.72 rows=16 width=89)
-> Gather Merge (cost=47138.85..47140.72 rows=16 width=89)
Workers Planned: 2
-> Sort (cost=46138.83..46138.85 rows=8 width=89)
Sort Key: created_at DESC
-> Parallel Seq Scan on events (cost=0.00..46138.71 rows=8 width... | 47,140.72 | [
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_created_at_desc_30dfce ON events (customer_id, created_at DESC) INCLUDE (event_type, payload)",
"cost": 72.36,
"reduction": 0.9985,
"size_bytes": 316432384
},
{
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (custo... | {
"ddl": "CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id)",
"cost": 75.63,
"reduction": 0.9984,
"size_bytes": 58056704
} |
train-s1-oltp_to_analytics-809 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 809 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 1 AND customer_id = 25968 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 1,
"customer_id": 25968
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.03..17360.27 rows=2 width=31)
-> Gather Merge (cost=17360.03..17360.27 rows=2 width=31)
Workers Planned: 2
-> Sort (cost=16360.01..16360.01 rows=1 width=31)
Sort Key: created_at DESC
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=3... | 17,360.27 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.11,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.48,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-847 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 847 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 31 AND customer_id = 69305 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 31,
"customer_id": 69305
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-866 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 866 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 9 AND customer_id = 9 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 9,
"customer_id": 9
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.03..17360.50 rows=4 width=31)
-> Gather Merge (cost=17360.03..17360.50 rows=4 width=31)
Workers Planned: 2
-> Sort (cost=16360.01..16360.01 rows=2 width=31)
Sort Key: created_at DESC
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=2 width=3... | 17,360.5 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.17,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_7bf8e7 ON orders (tenant_id, customer_id)",
"cost": 27.86,
"reduction": 0.9984,
"size_bytes": 34832384
} |
train-s1-oltp_to_analytics-937 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 937 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 37 AND customer_id = 11606 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 37,
"customer_id": 11606
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-972 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 972 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 10 AND customer_id = 164288 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 10,
"customer_id": 164288
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1051 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,051 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 6 AND customer_id = 117394 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 6,
"customer_id": 117394
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1084 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,084 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 6 AND customer_id = 182 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 6,
"customer_id": 182
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1107 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,107 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 17 AND customer_id = 46162 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 17,
"customer_id": 46162
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1183 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,183 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 1 AND customer_id = 143714 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 1,
"customer_id": 143714
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.03..17360.27 rows=2 width=31)
-> Gather Merge (cost=17360.03..17360.27 rows=2 width=31)
Workers Planned: 2
-> Sort (cost=16360.01..16360.01 rows=1 width=31)
Sort Key: created_at DESC
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=3... | 17,360.27 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.11,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.48,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1198 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,198 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 1 AND customer_id = 172387 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 1,
"customer_id": 172387
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.03..17360.27 rows=2 width=31)
-> Gather Merge (cost=17360.03..17360.27 rows=2 width=31)
Workers Planned: 2
-> Sort (cost=16360.01..16360.01 rows=1 width=31)
Sort Key: created_at DESC
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=3... | 17,360.27 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.11,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.48,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1272 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,272 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 11 AND customer_id = 22435 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 11,
"customer_id": 22435
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1461 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,461 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 1 AND customer_id = 17069 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 1,
"customer_id": 17069
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.03..17360.27 rows=2 width=31)
-> Gather Merge (cost=17360.03..17360.27 rows=2 width=31)
Workers Planned: 2
-> Sort (cost=16360.01..16360.01 rows=1 width=31)
Sort Key: created_at DESC
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=3... | 17,360.27 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.11,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.48,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1471 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,471 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 12 AND customer_id = 22880 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 12,
"customer_id": 22880
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1637 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,637 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 15 AND customer_id = 37211 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 15,
"customer_id": 37211
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-1725 | train | 1 | oltp_to_analytics | analytics | orders_by_customer | 1,725 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = 17 AND customer_id = 11672 ORDER BY created_at DESC LIMIT 20 | SELECT id, status, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND customer_id = %(customer_id)s ORDER BY created_at DESC LIMIT 20 | {
"tenant_id": 17,
"customer_id": 11672
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17360.11..17360.11 rows=1 width=31)
-> Sort (cost=17360.11..17360.11 rows=1 width=31)
Sort Key: created_at DESC
-> Gather (cost=1000.00..17360.10 rows=1 width=31)
Workers Planned: 2
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1 width=31)
... | 17,360.11 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer_id_created_at_desc_b3751c ON orders (tenant_id, customer_id, created_at DESC) INCLUDE (id, status, total)",
"cost": 4.07,
"reduction": 0.9998,
"size_bytes": 79831040
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_customer... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id)",
"cost": 39.46,
"reduction": 0.9977,
"size_bytes": 29024256
} |
train-s1-oltp_to_analytics-800 | train | 1 | oltp_to_analytics | analytics | pending_orders | 800 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 8 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 8
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17377.30..17388.97 rows=100 width=30)
-> Gather Merge (cost=17377.30..17482.77 rows=904 width=30)
Workers Planned: 2
-> Sort (cost=16377.28..16378.41 rows=452 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=452 widt... | 17,388.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 381.73,
"reduction": 0.978,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_a22b03 ON orders (tenant_id) WHERE status = 'p... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 381.73,
"reduction": 0.978,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-811 | train | 1 | oltp_to_analytics | analytics | pending_orders | 811 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 1 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 1
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17574.93..17586.60 rows=100 width=30)
-> Gather Merge (cost=17574.93..18887.06 rows=11246 width=30)
Workers Planned: 2
-> Sort (cost=16574.91..16588.96 rows=5623 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=5623 ... | 17,586.6 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 242.36,
"reduction": 0.9862,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status =... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status = 'pending'",
"cost": 311.23,
"reduction": 0.9823,
"size_bytes": 1425408
} |
train-s1-oltp_to_analytics-821 | train | 1 | oltp_to_analytics | analytics | pending_orders | 821 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 10 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 10
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17374.97..17386.63 rows=100 width=30)
-> Gather Merge (cost=17374.97..17466.21 rows=782 width=30)
Workers Planned: 2
-> Sort (cost=16374.94..16375.92 rows=391 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=391 widt... | 17,386.63 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 384.37,
"reduction": 0.9779,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_a22b03 ON orders (tenant_id) WHERE status = '... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 384.37,
"reduction": 0.9779,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-827 | train | 1 | oltp_to_analytics | analytics | pending_orders | 827 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 1 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 1
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17574.93..17586.60 rows=100 width=30)
-> Gather Merge (cost=17574.93..18887.06 rows=11246 width=30)
Workers Planned: 2
-> Sort (cost=16574.91..16588.96 rows=5623 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=5623 ... | 17,586.6 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 242.36,
"reduction": 0.9862,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status =... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status = 'pending'",
"cost": 311.23,
"reduction": 0.9823,
"size_bytes": 1425408
} |
train-s1-oltp_to_analytics-837 | train | 1 | oltp_to_analytics | analytics | pending_orders | 837 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 4 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 4
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17391.21..17402.88 rows=100 width=30)
-> Gather Merge (cost=17391.21..17581.62 rows=1632 width=30)
Workers Planned: 2
-> Sort (cost=16391.19..16393.23 rows=816 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=816 wid... | 17,402.88 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 366.72,
"reduction": 0.9789,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_a31380 ON orders (tenant_id, creat... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 366.72,
"reduction": 0.9789,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-849 | train | 1 | oltp_to_analytics | analytics | pending_orders | 849 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 5 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 5
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17385.71..17397.37 rows=100 width=30)
-> Gather Merge (cost=17385.71..17542.52 rows=1344 width=30)
Workers Planned: 2
-> Sort (cost=16385.68..16387.36 rows=672 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=672 wid... | 17,397.37 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 372.41,
"reduction": 0.9786,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_a31380 ON orders (tenant_id, creat... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 372.41,
"reduction": 0.9786,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-852 | train | 1 | oltp_to_analytics | analytics | pending_orders | 852 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 44 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 44
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17365.88..17377.55 rows=100 width=30)
-> Gather Merge (cost=17365.88..17403.22 rows=320 width=30)
Workers Planned: 2
-> Sort (cost=16365.86..16366.26 rows=160 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=160 widt... | 17,377.55 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 394.88,
"reduction": 0.9773,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_a22b03 ON orders (tenant_id) WHERE status = '... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 394.88,
"reduction": 0.9773,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-876 | train | 1 | oltp_to_analytics | analytics | pending_orders | 876 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 1 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 1
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17574.93..17586.60 rows=100 width=30)
-> Gather Merge (cost=17574.93..18887.06 rows=11246 width=30)
Workers Planned: 2
-> Sort (cost=16574.91..16588.96 rows=5623 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=5623 ... | 17,586.6 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 242.36,
"reduction": 0.9862,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status =... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status = 'pending'",
"cost": 311.23,
"reduction": 0.9823,
"size_bytes": 1425408
} |
train-s1-oltp_to_analytics-879 | train | 1 | oltp_to_analytics | analytics | pending_orders | 879 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 1 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 1
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17574.93..17586.60 rows=100 width=30)
-> Gather Merge (cost=17574.93..18887.06 rows=11246 width=30)
Workers Planned: 2
-> Sort (cost=16574.91..16588.96 rows=5623 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=5623 ... | 17,586.6 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 242.36,
"reduction": 0.9862,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status =... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status = 'pending'",
"cost": 311.23,
"reduction": 0.9823,
"size_bytes": 1425408
} |
train-s1-oltp_to_analytics-939 | train | 1 | oltp_to_analytics | analytics | pending_orders | 939 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 2 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 2
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17413.99..17425.66 rows=100 width=30)
-> Gather Merge (cost=17413.99..17743.48 rows=2824 width=30)
Workers Planned: 2
-> Sort (cost=16413.97..16417.50 rows=1412 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=1412 w... | 17,425.66 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 344.73,
"reduction": 0.9802,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status =... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 344.73,
"reduction": 0.9802,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-1036 | train | 1 | oltp_to_analytics | analytics | pending_orders | 1,036 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 36 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 36
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17367.26..17378.93 rows=100 width=30)
-> Gather Merge (cost=17367.26..17411.83 rows=382 width=30)
Workers Planned: 2
-> Sort (cost=16367.24..16367.71 rows=191 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=191 widt... | 17,378.93 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 393.11,
"reduction": 0.9774,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_a22b03 ON orders (tenant_id) WHERE status = '... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 393.11,
"reduction": 0.9774,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-1076 | train | 1 | oltp_to_analytics | analytics | pending_orders | 1,076 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 19 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 19
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17371.11..17382.77 rows=100 width=30)
-> Gather Merge (cost=17371.11..17438.78 rows=580 width=30)
Workers Planned: 2
-> Sort (cost=16371.08..16371.81 rows=290 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=290 widt... | 17,382.77 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 388.62,
"reduction": 0.9776,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_a22b03 ON orders (tenant_id) WHERE status = '... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 388.62,
"reduction": 0.9776,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-1077 | train | 1 | oltp_to_analytics | analytics | pending_orders | 1,077 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 1 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 1
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17574.93..17586.60 rows=100 width=30)
-> Gather Merge (cost=17574.93..18887.06 rows=11246 width=30)
Workers Planned: 2
-> Sort (cost=16574.91..16588.96 rows=5623 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=5623 ... | 17,586.6 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 242.36,
"reduction": 0.9862,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status =... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status = 'pending'",
"cost": 311.23,
"reduction": 0.9823,
"size_bytes": 1425408
} |
train-s1-oltp_to_analytics-1094 | train | 1 | oltp_to_analytics | analytics | pending_orders | 1,094 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 8 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 8
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17377.30..17388.97 rows=100 width=30)
-> Gather Merge (cost=17377.30..17482.77 rows=904 width=30)
Workers Planned: 2
-> Sort (cost=16377.28..16378.41 rows=452 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=452 widt... | 17,388.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 381.73,
"reduction": 0.978,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_a22b03 ON orders (tenant_id) WHERE status = 'p... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 381.73,
"reduction": 0.978,
"size_bytes": 1712128
} |
train-s1-oltp_to_analytics-1111 | train | 1 | oltp_to_analytics | analytics | pending_orders | 1,111 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = 1 AND status = 'pending' ORDER BY created_at LIMIT 100 | SELECT id, customer_id, total, created_at FROM orders WHERE tenant_id = %(tenant_id)s AND status = 'pending' ORDER BY created_at LIMIT 100 | {
"tenant_id": 1
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Limit (cost=17574.93..17586.60 rows=100 width=30)
-> Gather Merge (cost=17574.93..18887.06 rows=11246 width=30)
Workers Planned: 2
-> Sort (cost=16574.91..16588.96 rows=5623 width=30)
Sort Key: created_at
-> Parallel Seq Scan on orders (cost=0.00..16360.00 rows=5623 ... | 17,586.6 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending'",
"cost": 242.36,
"reduction": 0.9862,
"size_bytes": 1712128
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status =... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_created_at_d19063 ON orders (created_at) WHERE status = 'pending'",
"cost": 311.23,
"reduction": 0.9823,
"size_bytes": 1425408
} |
train-s1-oltp_to_analytics-919 | train | 1 | oltp_to_analytics | analytics | product_sales | 919 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 32702 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 32702
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-989 | train | 1 | oltp_to_analytics | analytics | product_sales | 989 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 41224 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 41224
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1024 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,024 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 18801 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 18801
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1070 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,070 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 35460 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 35460
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1315 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,315 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 3233 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 3233
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1329 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,329 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 3220 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 3220
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1340 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,340 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 599 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 599
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1393 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,393 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 14238 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 14238
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1512 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,512 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 42862 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 42862
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1527 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,527 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 48940 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 48940
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1554 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,554 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 10515 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 10515
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1556 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,556 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 12031 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 12031
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1561 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,561 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 5166 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 5166
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1610 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,610 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 48620 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 48620
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-1860 | train | 1 | oltp_to_analytics | analytics | product_sales | 1,860 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = 23805 | SELECT count(DISTINCT order_id) AS orders, sum(quantity) AS units FROM order_items WHERE product_id = %(product_id)s | {
"product_id": 23805
} | [
"order_items"
] | [
"CREATE TABLE order_items (order_id bigint NOT NULL, line_no integer NOT NULL, product_id bigint NOT NULL, quantity integer NOT NULL, unit_price numeric(10,2) NOT NULL, PRIMARY KEY (order_id, line_no)); -- ~3,000,000 rows"
] | Aggregate (cost=41633.96..41633.97 rows=1 width=16)
-> Gather Merge (cost=41625.70..41633.62 rows=68 width=12)
Workers Planned: 2
-> Sort (cost=40625.67..40625.74 rows=28 width=12)
Sort Key: order_id
-> Parallel Seq Scan on order_items (cost=0.00..40625.00 rows=28 wi... | 41,633.97 | [
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_186aed ON order_items (product_id) INCLUDE (order_id, quantity)",
"cost": 7.83,
"reduction": 0.9998,
"size_bytes": 139345920
},
{
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost... | {
"ddl": "CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id)",
"cost": 269.38,
"reduction": 0.9935,
"size_bytes": 87089152
} |
train-s1-oltp_to_analytics-835 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 835 | SELECT id, sku, price FROM products WHERE tenant_id = 27 AND category = 'home' AND price BETWEEN 143.93::numeric AND 189.66::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 27,
"category": "home",
"min_price": 143.93,
"max_price": 189.66
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.04..3174.05 rows=4 width=27)
-> Sort (cost=3174.04..3174.05 rows=4 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=4 width=27)
Filter: ((price >= 143.93) AND (price <= 189.66) AND (tenant_id = '27'::smallint) AND (category = 'home'::text)) | 3,174.05 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.14,
"reduction": 0.9987,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 18.52,
"reduction": 0.9942,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-850 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 850 | SELECT id, sku, price FROM products WHERE tenant_id = 1 AND category = 'grocery' AND price BETWEEN 124.92::numeric AND 142.86::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 1,
"category": "grocery",
"min_price": 124.92,
"max_price": 142.86
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3175.13..3175.24 rows=42 width=27)
-> Sort (cost=3175.13..3175.24 rows=42 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=42 width=27)
Filter: ((price >= 124.92) AND (price <= 142.86) AND (tenant_id = '1'::smallint) AND (category = 'grocery'::t... | 3,175.24 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 5.09,
"reduction": 0.9984,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 5.09,
"reduction": 0.9984,
"size_bytes": 3620864
} |
train-s1-oltp_to_analytics-851 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 851 | SELECT id, sku, price FROM products WHERE tenant_id = 2 AND category = 'music' AND price BETWEEN 68.74::numeric AND 118.54::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 2,
"category": "music",
"min_price": 68.74,
"max_price": 118.54
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.70..3174.78 rows=29 width=27)
-> Sort (cost=3174.70..3174.78 rows=29 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=29 width=27)
Filter: ((price >= 68.74) AND (price <= 118.54) AND (tenant_id = '2'::smallint) AND (category = 'music'::text... | 3,174.78 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.76,
"reduction": 0.9985,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.76,
"reduction": 0.9985,
"size_bytes": 3620864
} |
train-s1-oltp_to_analytics-857 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 857 | SELECT id, sku, price FROM products WHERE tenant_id = 18 AND category = 'clothing' AND price BETWEEN 395.09::numeric AND 494.51::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 18,
"category": "clothing",
"min_price": 395.09,
"max_price": 494.51
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.22..3174.25 rows=12 width=27)
-> Sort (cost=3174.22..3174.25 rows=12 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=12 width=27)
Filter: ((price >= 395.09) AND (price <= 494.51) AND (tenant_id = '18'::smallint) AND (category = 'clothing':... | 3,174.25 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.34,
"reduction": 0.9986,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 46.38,
"reduction": 0.9854,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-868 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 868 | SELECT id, sku, price FROM products WHERE tenant_id = 22 AND category = 'home' AND price BETWEEN 178.63::numeric AND 261.97::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 22,
"category": "home",
"min_price": 178.63,
"max_price": 261.97
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.14..3174.17 rows=9 width=27)
-> Sort (cost=3174.14..3174.17 rows=9 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=9 width=27)
Filter: ((price >= 178.63) AND (price <= 261.97) AND (tenant_id = '22'::smallint) AND (category = 'home'::text)) | 3,174.17 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.26,
"reduction": 0.9987,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 35.93,
"reduction": 0.9887,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-906 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 906 | SELECT id, sku, price FROM products WHERE tenant_id = 17 AND category = 'clothing' AND price BETWEEN 313.35::numeric AND 404.83::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 17,
"category": "clothing",
"min_price": 313.35,
"max_price": 404.83
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.19..3174.22 rows=11 width=27)
-> Sort (cost=3174.19..3174.22 rows=11 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=11 width=27)
Filter: ((price >= 313.35) AND (price <= 404.83) AND (tenant_id = '17'::smallint) AND (category = 'clothing':... | 3,174.22 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.32,
"reduction": 0.9986,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 42.9,
"reduction": 0.9865,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-909 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 909 | SELECT id, sku, price FROM products WHERE tenant_id = 31 AND category = 'garden' AND price BETWEEN 315.73::numeric AND 402.55::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 31,
"category": "garden",
"min_price": 315.73,
"max_price": 402.55
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.10..3174.12 rows=7 width=27)
-> Sort (cost=3174.10..3174.12 rows=7 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=7 width=27)
Filter: ((price >= 315.73) AND (price <= 402.55) AND (tenant_id = '31'::smallint) AND (category = 'garden'::text... | 3,174.12 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.22,
"reduction": 0.9987,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 28.97,
"reduction": 0.9909,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-993 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 993 | SELECT id, sku, price FROM products WHERE tenant_id = 23 AND category = 'home' AND price BETWEEN 151.66::numeric AND 225.65::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 23,
"category": "home",
"min_price": 151.66,
"max_price": 225.65
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.12..3174.14 rows=8 width=27)
-> Sort (cost=3174.12..3174.14 rows=8 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=8 width=27)
Filter: ((price >= 151.66) AND (price <= 225.65) AND (tenant_id = '23'::smallint) AND (category = 'home'::text)) | 3,174.14 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.24,
"reduction": 0.9987,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 32.45,
"reduction": 0.9898,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-1096 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 1,096 | SELECT id, sku, price FROM products WHERE tenant_id = 7 AND category = 'electronics' AND price BETWEEN 361.18::numeric AND 389.92::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 7,
"category": "electronics",
"min_price": 361.18,
"max_price": 389.92
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.08..3174.09 rows=6 width=27)
-> Sort (cost=3174.08..3174.09 rows=6 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=6 width=27)
Filter: ((price >= 361.18) AND (price <= 389.92) AND (tenant_id = '7'::smallint) AND (category = 'electronics'::... | 3,174.09 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.19,
"reduction": 0.9987,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 25.48,
"reduction": 0.992,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-1180 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 1,180 | SELECT id, sku, price FROM products WHERE tenant_id = 7 AND category = 'electronics' AND price BETWEEN 364.32::numeric AND 414.25::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 7,
"category": "electronics",
"min_price": 364.32,
"max_price": 414.25
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.19..3174.22 rows=11 width=27)
-> Sort (cost=3174.19..3174.22 rows=11 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=11 width=27)
Filter: ((price >= 364.32) AND (price <= 414.25) AND (tenant_id = '7'::smallint) AND (category = 'electronics... | 3,174.22 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.32,
"reduction": 0.9986,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 42.9,
"reduction": 0.9865,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-1189 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 1,189 | SELECT id, sku, price FROM products WHERE tenant_id = 40 AND category = 'toys' AND price BETWEEN 15.49::numeric AND 89.1::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 40,
"category": "toys",
"min_price": 15.49,
"max_price": 89.1
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.04..3174.05 rows=4 width=27)
-> Sort (cost=3174.04..3174.05 rows=4 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=4 width=27)
Filter: ((price >= 15.49) AND (price <= 89.1) AND (tenant_id = '40'::smallint) AND (category = 'toys'::text)) | 3,174.05 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.14,
"reduction": 0.9987,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 18.52,
"reduction": 0.9942,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-1222 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 1,222 | SELECT id, sku, price FROM products WHERE tenant_id = 12 AND category = 'books' AND price BETWEEN 373.35::numeric AND 468.56::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 12,
"category": "books",
"min_price": 373.35,
"max_price": 468.56
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.27..3174.30 rows=14 width=27)
-> Sort (cost=3174.27..3174.30 rows=14 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=14 width=27)
Filter: ((price >= 373.35) AND (price <= 468.56) AND (tenant_id = '12'::smallint) AND (category = 'books'::te... | 3,174.3 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.39,
"reduction": 0.9986,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 53.35,
"reduction": 0.9832,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-1302 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 1,302 | SELECT id, sku, price FROM products WHERE tenant_id = 1 AND category = 'automotive' AND price BETWEEN 217.15::numeric AND 229.13::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 1,
"category": "automotive",
"min_price": 217.15,
"max_price": 229.13
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.67..3174.74 rows=28 width=27)
-> Sort (cost=3174.67..3174.74 rows=28 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=28 width=27)
Filter: ((price >= 217.15) AND (price <= 229.13) AND (tenant_id = '1'::smallint) AND (category = 'automotive'... | 3,174.74 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.74,
"reduction": 0.9985,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.74,
"reduction": 0.9985,
"size_bytes": 3620864
} |
train-s1-oltp_to_analytics-1303 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 1,303 | SELECT id, sku, price FROM products WHERE tenant_id = 13 AND category = 'books' AND price BETWEEN 132.22::numeric AND 156.87::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 13,
"category": "books",
"min_price": 132.22,
"max_price": 156.87
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.02..3174.03 rows=3 width=27)
-> Sort (cost=3174.02..3174.03 rows=3 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=3 width=27)
Filter: ((price >= 132.22) AND (price <= 156.87) AND (tenant_id = '13'::smallint) AND (category = 'books'::text)... | 3,174.03 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.12,
"reduction": 0.9987,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 15.03,
"reduction": 0.9953,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-1318 | train | 1 | oltp_to_analytics | analytics | products_in_price_band | 1,318 | SELECT id, sku, price FROM products WHERE tenant_id = 8 AND category = 'electronics' AND price BETWEEN 344.32::numeric AND 397.31::numeric ORDER BY price LIMIT 50 | SELECT id, sku, price FROM products WHERE tenant_id = %(tenant_id)s AND category = %(category)s AND price BETWEEN %(min_price)s::numeric AND %(max_price)s::numeric ORDER BY price LIMIT 50 | {
"tenant_id": 8,
"category": "electronics",
"min_price": 344.32,
"max_price": 397.31
} | [
"products"
] | [
"CREATE TABLE products (id bigint NOT NULL, tenant_id integer NOT NULL, sku text NOT NULL, category text NOT NULL, price numeric(10,2) NOT NULL, stock integer NOT NULL, created_at timestamp with time zone NOT NULL, embedding vector(64) NOT NULL, PRIMARY KEY (id)); -- ~50,000 rows"
] | Limit (cost=3174.17..3174.19 rows=10 width=27)
-> Sort (cost=3174.17..3174.19 rows=10 width=27)
Sort Key: price
-> Seq Scan on products (cost=0.00..3174.00 rows=10 width=27)
Filter: ((price >= 344.32) AND (price <= 397.31) AND (tenant_id = '8'::smallint) AND (category = 'electronics... | 3,174.19 | [
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_3a9552 ON products (tenant_id, category, price) INCLUDE (id, sku)",
"cost": 4.29,
"reduction": 0.9986,
"size_bytes": 3620864
},
{
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_bac6ef ON products (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price)",
"cost": 39.42,
"reduction": 0.9876,
"size_bytes": 2097152
} |
train-s1-oltp_to_analytics-889 | train | 1 | oltp_to_analytics | analytics | tenant_daily_revenue | 889 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = 1 AND created_at >= '2024-06-08T00:00:00+00:00'::timestamptz AND created_at < '2024-09-06T00:00:00+00:00'::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = %(tenant_id)s AND created_at >= %(start)s::timestamptz AND created_at < %(end)s::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | {
"tenant_id": 1,
"start": "2024-06-08T00:00:00+00:00",
"end": "2024-09-06T00:00:00+00:00"
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Finalize GroupAggregate (cost=20358.70..24390.90 rows=31031 width=48)
Group Key: (date_trunc('day'::text, created_at))
-> Gather Merge (cost=20358.70..23666.84 rows=25860 width=48)
Workers Planned: 2
-> Partial GroupAggregate (cost=19358.68..19681.93 rows=12930 width=48)
Group Key... | 24,390.9 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 14822.8,
"reduction": 0.3923,
"size_bytes": 31973376
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_a31380 ON orders (tenant_id, ... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 14822.8,
"reduction": 0.3923,
"size_bytes": 31973376
} |
train-s1-oltp_to_analytics-1055 | train | 1 | oltp_to_analytics | analytics | tenant_daily_revenue | 1,055 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = 2 AND created_at >= '2024-03-26T00:00:00+00:00'::timestamptz AND created_at < '2024-05-30T00:00:00+00:00'::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = %(tenant_id)s AND created_at >= %(start)s::timestamptz AND created_at < %(end)s::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | {
"tenant_id": 2,
"start": "2024-03-26T00:00:00+00:00",
"end": "2024-05-30T00:00:00+00:00"
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Finalize GroupAggregate (cost=19578.71..20301.58 rows=5563 width=48)
Group Key: (date_trunc('day'::text, created_at))
-> Gather Merge (cost=19578.71..20171.77 rows=4636 width=48)
Workers Planned: 2
-> Partial GroupAggregate (cost=18578.69..18636.64 rows=2318 width=48)
Group Key: (... | 20,301.58 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 9630.77,
"reduction": 0.5256,
"size_bytes": 31973376
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_a31380 ON orders (tenant_id, ... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 9630.77,
"reduction": 0.5256,
"size_bytes": 31973376
} |
train-s1-oltp_to_analytics-1132 | train | 1 | oltp_to_analytics | analytics | tenant_daily_revenue | 1,132 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = 21 AND created_at >= '2024-10-27T00:00:00+00:00'::timestamptz AND created_at < '2024-12-01T00:00:00+00:00'::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = %(tenant_id)s AND created_at >= %(start)s::timestamptz AND created_at < %(end)s::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | {
"tenant_id": 21,
"start": "2024-10-27T00:00:00+00:00",
"end": "2024-12-01T00:00:00+00:00"
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Finalize GroupAggregate (cost=19453.05..19525.42 rows=558 width=48)
Group Key: (date_trunc('day'::text, created_at))
-> Gather Merge (cost=19453.05..19512.41 rows=464 width=48)
Workers Planned: 2
-> Partial GroupAggregate (cost=18453.03..18458.83 rows=232 width=48)
Group Key: (dat... | 19,525.42 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 1868.56,
"reduction": 0.9043,
"size_bytes": 31973376
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_a31380 ON orders (tenant_id, ... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 1868.56,
"reduction": 0.9043,
"size_bytes": 31973376
} |
train-s1-oltp_to_analytics-1205 | train | 1 | oltp_to_analytics | analytics | tenant_daily_revenue | 1,205 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = 1 AND created_at >= '2025-02-06T00:00:00+00:00'::timestamptz AND created_at < '2025-05-02T00:00:00+00:00'::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = %(tenant_id)s AND created_at >= %(start)s::timestamptz AND created_at < %(end)s::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | {
"tenant_id": 1,
"start": "2025-02-06T00:00:00+00:00",
"end": "2025-05-02T00:00:00+00:00"
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Finalize GroupAggregate (cost=20295.55..24074.52 rows=29082 width=48)
Group Key: (date_trunc('day'::text, created_at))
-> Gather Merge (cost=20295.55..23395.93 rows=24236 width=48)
Workers Planned: 2
-> Partial GroupAggregate (cost=19295.52..19598.47 rows=12118 width=48)
Group Key... | 24,074.52 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 14514.36,
"reduction": 0.3971,
"size_bytes": 31973376
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_a31380 ON orders (tenant_id,... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 14514.36,
"reduction": 0.3971,
"size_bytes": 31973376
} |
train-s1-oltp_to_analytics-1305 | train | 1 | oltp_to_analytics | analytics | tenant_daily_revenue | 1,305 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = 3 AND created_at >= '2024-09-24T00:00:00+00:00'::timestamptz AND created_at < '2024-12-21T00:00:00+00:00'::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = %(tenant_id)s AND created_at >= %(start)s::timestamptz AND created_at < %(end)s::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | {
"tenant_id": 3,
"start": "2024-09-24T00:00:00+00:00",
"end": "2024-12-21T00:00:00+00:00"
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Finalize GroupAggregate (cost=19571.38..20259.32 rows=5294 width=48)
Group Key: (date_trunc('day'::text, created_at))
-> Gather Merge (cost=19571.38..20135.79 rows=4412 width=48)
Workers Planned: 2
-> Partial GroupAggregate (cost=18571.36..18626.51 rows=2206 width=48)
Group Key: (... | 20,259.32 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 9412.86,
"reduction": 0.5354,
"size_bytes": 31973376
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_a31380 ON orders (tenant_id, ... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 9412.86,
"reduction": 0.5354,
"size_bytes": 31973376
} |
train-s1-oltp_to_analytics-1335 | train | 1 | oltp_to_analytics | analytics | tenant_daily_revenue | 1,335 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = 5 AND created_at >= '2025-04-25T00:00:00+00:00'::timestamptz AND created_at < '2025-07-13T00:00:00+00:00'::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | SELECT date_trunc('day', created_at) AS day, count(*) AS orders, sum(total) AS revenue FROM orders WHERE tenant_id = %(tenant_id)s AND created_at >= %(start)s::timestamptz AND created_at < %(end)s::timestamptz AND status <> 'cancelled' GROUP BY 1 ORDER BY 1 | {
"tenant_id": 5,
"start": "2025-04-25T00:00:00+00:00",
"end": "2025-07-13T00:00:00+00:00"
} | [
"orders"
] | [
"CREATE TABLE orders (id bigint NOT NULL, tenant_id integer NOT NULL, customer_id bigint NOT NULL, status text NOT NULL, total numeric(12,2) NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY (id)); -- ~1,000,000 rows"
] | Finalize GroupAggregate (cost=19517.73..19942.79 rows=3272 width=48)
Group Key: (date_trunc('day'::text, created_at))
-> Gather Merge (cost=19517.73..19866.45 rows=2726 width=48)
Workers Planned: 2
-> Partial GroupAggregate (cost=18517.70..18551.78 rows=1363 width=48)
Group Key: (... | 19,942.79 | [
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 7251.27,
"reduction": 0.6364,
"size_bytes": 31973376
},
{
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_a31380 ON orders (tenant_id, ... | {
"ddl": "CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled'",
"cost": 7251.27,
"reduction": 0.6364,
"size_bytes": 31973376
} |
index-drift-rl benchmark
Synthetic, reproducible benchmark for LLM-based PostgreSQL index advisors under drifting workloads. Generated by index-drift-rl (Phase 2).
Tasks
single: given a slow query, its EXPLAIN plan and the schema of the
tables involved, propose the single best B-tree index (or none).
windows: given a window of a query log (template mix with example
queries) and the indexes left by the previous window, propose the index set
to have now, with at most 3 indexes. The workload drifts between windows
(OLTP -> analytics -> vector search -> a small tenant becoming the busiest), so
good answers create new indexes and drop stale ones.
How labels are made
- Candidates are enumerated with classic index-design rules (equality columns,
then a range/sort column; partial
WHEREpredicates; coveringINCLUDE). - Each candidate is created as a hypothetical index with
HypoPG and scored by the planner's
estimated cost (
EXPLAIN). No index is actually built. single: the label is the smallest candidate within 2% of the best cost reduction, ornullif nothing reduces cost by at least 20%.windows: greedy selection of the set minimising workload-weighted cost, preferring to keep an existing index when it is within 2% of the best.
Files
| File | Rows |
|---|---|
single/train.jsonl |
2488 |
single/test.jsonl |
829 |
single/test_unseen_templates.jsonl |
163 |
windows/train.jsonl |
96 |
windows/test.jsonl |
32 |
schema.sql holds the table definitions (with row-count estimates).
single fields: query (parameters inlined), sql + params (parameterised),
schema, plan, baseline_cost, candidates (top 5 with cost reduction and
estimated size), label (ddl, reduction, size_bytes, or null), plus
scenario / phase / template metadata.
Per-template statistics (single)
| Template | Examples | Labelled | Most common label |
|---|---|---|---|
customer_by_email |
540 | 540 | CREATE INDEX CONCURRENTLY customers_lower_email_3dbcf9 ON customers ((lower(email))) |
customer_recent_events |
540 | 540 | CREATE INDEX CONCURRENTLY events_customer_id_4b8e0d ON events (customer_id) |
events_by_source |
45 | 45 | CREATE INDEX CONCURRENTLY events_tenant_id_payload_source_1e0a3b ON events (tenant_id, (payload ->> 'source')) |
low_stock_products |
118 | 118 | CREATE INDEX CONCURRENTLY products_tenant_id_6e844b ON products (tenant_id) WHERE stock < 5 |
orders_by_customer |
600 | 600 | CREATE INDEX CONCURRENTLY orders_customer_id_aa8024 ON orders (customer_id) |
pending_orders |
521 | 521 | CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_f2a203 ON orders (tenant_id, created_at) WHERE status = 'pending' |
product_sales |
161 | 161 | CREATE INDEX CONCURRENTLY order_items_product_id_ee9eb6 ON order_items (product_id) |
products_in_price_band |
595 | 595 | CREATE INDEX CONCURRENTLY products_tenant_id_category_price_9516fb ON products (tenant_id, category, price) |
tenant_daily_revenue |
180 | 180 | CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_af8293 ON orders (tenant_id, created_at) WHERE status <> 'cancelled' |
top_products |
180 | 160 | CREATE INDEX CONCURRENTLY orders_tenant_id_created_at_db7891 ON orders (tenant_id, created_at) INCLUDE (id) |
events_by_source and low_stock_products never appear in train: they form
the test_unseen_templates split.
Validation with real indexes
Most common label per template, built for real; up to 10 queries each, median of 3 runs per query. Speedups are per query.
| Template | Estimated cost change | Median before (ms) | Median after (ms) | Median speedup | Worst speedup | Queries slower | Tenants slower |
|---|---|---|---|---|---|---|---|
customer_by_email |
-64% | 63.479 | 1.02 | x59.4 | x51.84 | 0% | - |
customer_recent_events |
-100% | 112.198 | 1.302 | x83.3 | x46.42 | 0% | - |
events_by_source |
-97% | 136.711 | 21.689 | x6.5 | x1.73 | 0% | - |
low_stock_products |
-99% | 7.408 | 0.788 | x9.6 | x6.89 | 0% | - |
orders_by_customer |
-100% | 50.076 | 1.297 | x37.4 | x28.26 | 0% | - |
pending_orders |
-98% | 48.346 | 1.456 | x32.5 | x22.16 | 0% | - |
product_sales |
-99% | 105.813 | 0.919 | x115.7 | x80.93 | 0% | - |
products_in_price_band |
-99% | 9.6 | 1.448 | x6.4 | x5.83 | 0% | - |
tenant_daily_revenue |
-62% | 54.774 | 9.321 | x5.8 | x1.95 | 0% | - |
top_products |
-49% | 83.376 | 91.415 | x5.1 | x0.55 | 20% | 1 |
Where queries got slower, it is typically for tenant 1, which owns ~27% of rows. The planner estimates the index is cheaper for that tenant too, then picks a plan that is slower in reality. One index serving every tenant is not always right: this is exactly the skew an advisor has to reason about.
Limitations
- Synthetic, single schema. 10 relational query templates over one
multi-tenant commerce schema; models can memorise template -> index. The
test_unseen_templatessplit is the honest generalisation check. - Planner estimates, not latency. Labels follow the planner's cost model,
which can be wrong: HypoPG has no statistics for expression indexes (e.g.
lower(email)), so their benefit is underestimated, and for heavily skewed tenants an "improving" index can lead to a slower plan. The validation table shows the real effect. - No vector indexes. HypoPG cannot simulate HNSW; vector-search queries
appear in
windowsworkload summaries (simulated: false) but do not affect labels.
Loading
from datasets import load_dataset
single = load_dataset("krishna382nitjsr/index-drift-rl-bench", "single")
windows = load_dataset("krishna382nitjsr/index-drift-rl-bench", "windows")
Dataset scale: {'scale': 1.0, 'n_tenants': 50, 'n_customers': 200000, 'n_products': 50000, 'n_orders': 1000000, 'n_events': 2000000, 'embedding_dim': 64}.
- Downloads last month
- 51