Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8bfe42a
Add bringg benchmark with setup and teardown
eylonronen Mar 18, 2025
09e3360
Add query to load data into tasks table
eylonronen Mar 18, 2025
fa08dfc
Add query to load data into way_points table
eylonronen Mar 18, 2025
6a6b048
Add query to load data into customers table
eylonronen Mar 18, 2025
091e372
Merge branch 'master' of github.com:crate/crate-benchmarks
eylonronen Mar 18, 2025
1737083
Remove redundant concurrency
eylonronen Mar 18, 2025
8f83821
Add queries for the no filters default case
eylonronen Mar 18, 2025
ccd5111
Add queries for the single team filter case
eylonronen Mar 18, 2025
ea2c92f
Add queries for the many teams filter case
eylonronen Mar 18, 2025
cfada14
Add full_search_analyzer
eylonronen Mar 18, 2025
884f152
Add queries filtering on first wp customer name
eylonronen Mar 18, 2025
9b147b8
Add queries filtering on customer phone
eylonronen Mar 18, 2025
173f96d
Change match type to phrase
eylonronen Mar 19, 2025
c75c8bd
Add queries filtering on waypoint time frame
eylonronen Mar 19, 2025
b387997
Add full_search_ngram_analyzer analyzer
eylonronen Mar 19, 2025
b6f1a48
Format setup file
eylonronen Mar 19, 2025
00e72c8
Remove redundant joins
eylonronen Mar 19, 2025
a1a35b8
Add queries filtering on task title/external_id
eylonronen Mar 19, 2025
d8500f6
Add names to queries
eylonronen Mar 19, 2025
00e53fd
Normalize names
eylonronen Mar 19, 2025
83c8d73
Add queries filtering on task_type_id and first wp city and second wp…
eylonronen Mar 19, 2025
7572d01
Use correct analyzer for latest added queries
eylonronen Mar 19, 2025
94df395
Add queries filtering on customer phone and wp time frame
eylonronen Mar 19, 2025
e6e4ef5
Add queries filtering on customer phone and wp time frame and task ti…
eylonronen Mar 19, 2025
da3e8eb
Add queries simulating the base case with unnecessary joins for compa…
eylonronen Mar 19, 2025
6256b15
Move bringg benchmark related files to bringg folder
eylonronen Mar 19, 2025
df0b872
Add bringg_medium spec with 10X data of small spec
eylonronen Mar 19, 2025
27c57cc
Add bringg_large spec with 100X data of small spec
eylonronen Mar 19, 2025
63cd0f2
Shard tables to 3 shards instead of default
eylonronen Mar 23, 2025
73ada9c
Remove manual shard size selection
eylonronen Mar 23, 2025
42e4cd7
Increase granularity of wp timeframe
eylonronen Mar 24, 2025
d4e9b66
Move tables loading to setup
eylonronen Mar 27, 2025
a998720
Run analyze at the end of data ingestion
eylonronen Mar 27, 2025
47a68a0
Reduce concurrency
eylonronen Mar 27, 2025
f74b200
Extract tables loading to another file
eylonronen Mar 27, 2025
2413ac7
Remove explicit sharding
eylonronen Mar 27, 2025
085cac0
Shard tables to 6 shards
eylonronen Apr 3, 2025
6e6e4d4
Add merchant_id to customers and way_points
eylonronen Apr 3, 2025
02e07ea
Add merchant_id to customers and way_points
eylonronen Apr 3, 2025
eed8d8b
Add merchant_id filter to large test spec and reduce iterations count…
eylonronen Apr 3, 2025
d25f5e1
comment out very long running queries from large spec
eylonronen Apr 3, 2025
c469eef
Add merchant_id filter to medium test spec and reduce iterations coun…
eylonronen Apr 3, 2025
78c01ce
Add missing merchant_id filters
eylonronen Apr 3, 2025
3c70f0d
Add merchant_id filter to small test spec and reduce iterations count…
eylonronen Apr 3, 2025
eb1cf18
Optimize number of shards
eylonronen May 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,270 changes: 2,270 additions & 0 deletions specs/bringg/bringg_large.toml

Large diffs are not rendered by default.

2,270 changes: 2,270 additions & 0 deletions specs/bringg/bringg_medium.toml

Large diffs are not rendered by default.

2,270 changes: 2,270 additions & 0 deletions specs/bringg/bringg_small.toml

Large diffs are not rendered by default.

342 changes: 342 additions & 0 deletions specs/bringg/sql/bringg_setup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,342 @@
CREATE ANALYZER ngram_lowercase_analyzer (
TOKENIZER ngram_tokenizer with (
min_gram = 2,
max_gram = 10,
type = "ngram"
),
TOKEN_FILTERS (asciifolding, lowercase)
);

CREATE ANALYZER edge_ngram_lowercase_analyzer (
TOKENIZER edge_ngram_tokenizer with (
min_gram = 2,
max_gram = 30,
type = "edge_ngram",
token_chars = ["letter",
"digit",
"symbol",
"punctuation"]
),
TOKEN_FILTERS (asciifolding, lowercase)
);

CREATE ANALYZER edge_ngram_full_field_analyzer (
TOKENIZER edge_ngram_full_field_tokenizer with (
min_gram = 2,
max_gram = 30,
type = "edge_ngram"
),
TOKEN_FILTERS (
asciifolding,
lowercase,
length_min_2_chars with (type = "length", min = 2)
)
);

CREATE ANALYZER edge_ngram_phone_analyzer (
TOKENIZER edge_ngram_phone_tokenizer with (
min_gram = 2,
max_gram = 15,
type = "edge_ngram",
token_chars = [
"digit"
]
)
);

CREATE ANALYZER full_search_analyzer extends whitespace with (
TOKEN_FILTERS (
asciifolding,
lowercase,
length_min_2_chars with (type = "length", min = 2)
)
);

CREATE ANALYZER full_search_ngram_analyzer extends keyword with (TOKEN_FILTERS (asciifolding, lowercase));

create table customers (
id integer,
name text,
address text,
lat double precision,
lng double precision,
created_at timestamp without time zone,
updated_at timestamp without time zone,
phone text,
merchant_id integer,
image character varying(255),
access_token character varying(255),
confirmation_code character varying(255),
approved boolean,
push_token character varying(255),
uuid text,
email character varying(255),
external_id text,
delete_at timestamp without time zone,
extras object,
original_lat_lng_changed timestamp without time zone,
blocked_email boolean,
address_second_line text,
zipcode character varying,
stripe_id character varying,
original_phone_number character varying,
uploaded_profile_image character varying,
original_lat double precision,
original_lng double precision,
consecutive_checkins_out_of_geofence integer,
allow_sending_email boolean,
allow_sending_sms boolean,
mobile_version character varying,
mobile_type integer,
mobile_maker character varying,
client_version character varying,
client_name character varying,
city character varying,
borough character varying,
state character varying,
dev boolean,
business_code character varying,
language character varying(255),
district character varying,
house_number integer,
street character varying,
allow_dynamically_updating_location boolean,
address_type integer,
tax_payer_external_id character varying,
tax_payer_name character varying,
rank integer,
user_id integer,
has_parking_area boolean,
driver_preparation_time integer,
default_estimate_duration_on_site_in_seconds integer,
kind integer,
INDEX name_ngram using fulltext (name) with (analyzer = 'edge_ngram_lowercase_analyzer'),
INDEX external_id_ngram using fulltext (external_id) with (analyzer = 'ngram_lowercase_analyzer'),
INDEX phone_ngram using fulltext (phone) with (analyzer = 'edge_ngram_phone_analyzer'),
INDEX original_phone_number_ngram using fulltext (original_phone_number) with (analyzer = 'edge_ngram_phone_analyzer'),
INDEX address_ngram using fulltext (address) with (analyzer = 'ngram_lowercase_analyzer'),
INDEX original_phone_number_ignore using fulltext (original_phone_number) with (analyzer = 'full_search_analyzer')
) clustered into 12 shards;

create table way_points (
id integer,
lat double precision,
lng double precision,
task_id integer,
done boolean,
created_at timestamp without time zone,
updated_at timestamp without time zone,
customer_id integer,
address text,
position integer,
scheduled_at timestamp without time zone,
checkin_time timestamp without time zone,
checkout_time timestamp without time zone,
note character varying(255),
find_me boolean,
asap boolean,
late boolean,
eta timestamp without time zone,
etl timestamp without time zone,
silent boolean,
phone text,
email character varying(255),
delete_at timestamp without time zone,
checkin_lat double precision,
checkin_lng double precision,
checkout_lat double precision,
checkout_lng double precision,
etos integer,
distance_traveled_client double precision,
distance_traveled_server double precision,
automatically_checked_in integer,
automatically_checked_out integer,
merchant_id integer,
start_lat double precision,
start_lng double precision,
start_time timestamp without time zone,
estimated_distance integer,
estimated_time integer,
allow_editing_inventory boolean,
must_approve_inventory boolean,
address_second_line text,
zipcode character varying,
allow_scanning_inventory boolean,
allow_editing_payment boolean,
late_reason character varying,
no_later_than timestamp without time zone,
no_earlier_than timestamp without time zone,
masked_phone_number character varying,
twilio_number_id integer,
marked_late_at timestamp without time zone,
borough character varying,
city character varying,
distance_traveled double precision,
state character varying,
delivery_confirmation_scan integer,
delivery_confirmation_note integer,
delivery_confirmation_photo integer,
delivery_confirmation_signature integer,
delivery_confirmation_form integer,
delivery_confirmation_ocr integer,
company_name character varying,
customer_contact_ids integer [],
contacts object,
allow_editing_original_quantity boolean,
pickup_dropoff_option integer,
delivery_confirmation_cash integer,
district character varying,
house_number integer,
street character varying,
pending_geocode boolean,
original_eta timestamp without time zone,
allow_automatic_set_coordinates boolean,
has_to_leave_by timestamp without time zone,
extras object,
automatically_geocoded boolean,
original_etl timestamp without time zone,
hidden boolean,
address_type integer,
location_name character varying,
location_id integer,
name character varying,
ui_data object,
first_attempt_promise_no_earlier_than timestamp without time zone,
first_attempt_promise_no_later_than timestamp without time zone,
driver_preparation_time integer,
parking_spot_id integer,
checkin_origin integer,
checkout_origin integer,
predicted_etos integer,
delivery_method character varying,
base_etos integer,
verification_pin_code character varying,
INDEX address_ngram using fulltext (address) with (analyzer = 'edge_ngram_lowercase_analyzer'),
INDEX city_ngram using fulltext (city) with (analyzer = 'edge_ngram_lowercase_analyzer'),
INDEX zipcode_ngram using fulltext (zipcode) with (analyzer = 'edge_ngram_full_field_analyzer'),
INDEX phone_ngram using fulltext (phone) with (analyzer = 'edge_ngram_phone_analyzer'),
INDEX zipcode_ignore using fulltext (zipcode) with (analyzer = 'full_search_analyzer')
) clustered into 12 shards;

create table tasks (
id integer,
title text,
customer_id integer,
user_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
status integer,
merchant_id integer,
delete_at timestamp without time zone,
shift_id integer,
alerted_client_time timestamp without time zone,
extras object,
active_way_point_id integer,
started_time timestamp without time zone,
ended_time timestamp without time zone,
late boolean,
external_id text INDEX using fulltext,
start_lat double precision,
start_lng double precision,
uuid text,
priority integer,
distance_traveled double precision,
automatically_started integer,
total_price double precision,
price_before_tax double precision,
tax_price double precision,
payment_method integer,
tip double precision,
left_to_be_paid double precision,
origin_id integer,
webhooks object,
delivery_price double precision,
accept_time timestamp without time zone,
last_assigned_time timestamp without time zone,
dispatcher_id integer,
automatically_assigned boolean,
tag_id integer,
automatically_ended integer,
automatically_cancelled integer,
test boolean,
late_reason text,
ready_to_execute boolean,
cancelled_at timestamp without time zone,
first_way_point_lat double precision,
first_way_point_lng double precision,
last_way_point_lat double precision,
last_way_point_lng double precision,
first_way_point_schedule timestamp without time zone,
last_way_point_schedule timestamp without time zone,
discount double precision,
tip_driver_enabled boolean,
pre_delivery_tip double precision,
post_delivery_tip_cash double precision,
post_delivery_tip_credit double precision,
run_uuid text,
scheduled_to_be_ready timestamp without time zone,
run_start_time timestamp without time zone,
run_end_time timestamp without time zone,
group_uuid text,
group_leader_id integer,
task_type_id integer,
parent_task_id integer,
cancellation_lat double precision,
cancellation_lng double precision,
not_ready_to_execute_and_invisible boolean,
run_id integer,
distance_automatically_set integer,
done_processing boolean,
payment_type_name text,
linked_task_id integer,
shadow_task_id integer,
shadow_master_task_id integer,
first_way_point_has_to_leave_by timestamp without time zone,
acknowledged_at timestamp without time zone,
task_configuration_id integer,
fleet_id integer,
fleet_delivery_external_id text,
start_preparation_at timestamp without time zone,
preparation_acknowledge_time_actual timestamp without time zone,
preparation_start_time_actual timestamp without time zone,
preparation_start_time_planned timestamp without time zone,
preparation_end_time_actual timestamp without time zone,
preparation_end_time_planned timestamp without time zone,
preparation_ready_for_pickup_time_actual timestamp without time zone,
preparation_ready_for_pickup_time_planned timestamp without time zone,
preparation_picked_up_time_actual timestamp without time zone,
preparation_status integer,
required_skills array(varchar),
quote_id text,
delivery_window_id integer,
origin_title text,
last_ready_to_execute_at timestamp without time zone,
round_trip boolean,
failed_delivery_attempts integer,
virtual_task boolean,
action_data object,
planning_done boolean,
delivery_cost double precision,
internal_fee double precision,
invalidated boolean,
preparation_external_id text,
service_plan_id integer,
rank integer,
left_to_be_paid_for_delivery integer,
planning_published boolean,
teams_ids array(integer),
small_cart_fee double precision,
service_fee double precision,
vehicle_id integer,
total_weight double precision,
additional_attributes object,
reserved_until timestamp without time zone,
recurrent_task_template_id integer,
total_handling_units object,
team_id integer,
INDEX external_id_ngram using fulltext (external_id) with (analyzer = 'ngram_lowercase_analyzer'),
INDEX title_standard using fulltext (title),
INDEX title_ngram using fulltext (title) with (analyzer = 'edge_ngram_lowercase_analyzer'),
INDEX preparation_external_id_ignore using fulltext (preparation_external_id) with (analyzer = 'full_search_analyzer'),
INDEX preparation_external_id_ignore_two using fulltext (preparation_external_id) with (analyzer = 'full_search_ngram_analyzer')
) clustered into 12 shards;
Loading