From 8bfe42a95ecb25a4fe9ff0b3c9f5fbf6467732d7 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 12:41:36 +0200 Subject: [PATCH 01/44] Add bringg benchmark with setup and teardown --- specs/bringg.toml | 6 + specs/sql/bringg_setup.sql | 338 ++++++++++++++++++++++++++++++++++ specs/sql/bringg_teardown.sql | 7 + 3 files changed, 351 insertions(+) create mode 100644 specs/bringg.toml create mode 100644 specs/sql/bringg_setup.sql create mode 100644 specs/sql/bringg_teardown.sql diff --git a/specs/bringg.toml b/specs/bringg.toml new file mode 100644 index 0000000..e7f9dab --- /dev/null +++ b/specs/bringg.toml @@ -0,0 +1,6 @@ +[setup] +statement_files = ["sql/bringg_setup.sql"] + + +[teardown] + statement_files = ["sql/bringg_teardown.sql"] diff --git a/specs/sql/bringg_setup.sql b/specs/sql/bringg_setup.sql new file mode 100644 index 0000000..d72462f --- /dev/null +++ b/specs/sql/bringg_setup.sql @@ -0,0 +1,338 @@ +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 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') +); + +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') +); + + +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') +); diff --git a/specs/sql/bringg_teardown.sql b/specs/sql/bringg_teardown.sql new file mode 100644 index 0000000..02d55ec --- /dev/null +++ b/specs/sql/bringg_teardown.sql @@ -0,0 +1,7 @@ +DROP TABLE customers; +DROP TABLE way_points; +DROP TABLE tasks; +DROP ANALYZER ngram_lowercase_analyzer; +DROP ANALYZER edge_ngram_lowercase_analyzer; +DROP ANALYZER edge_ngram_full_field_analyzer; +DROP ANALYZER edge_ngram_phone_analyzer; From 09e3360e3acf3a2b1c1c2775df094cd38c5ae4ba Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 13:42:10 +0200 Subject: [PATCH 02/44] Add query to load data into tasks table --- specs/bringg.toml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/specs/bringg.toml b/specs/bringg.toml index e7f9dab..372c78e 100644 --- a/specs/bringg.toml +++ b/specs/bringg.toml @@ -1,6 +1,41 @@ [setup] statement_files = ["sql/bringg_setup.sql"] +[[queries]] +name="load-tasks" +concurrency=10 +statement = ''' +insert into + tasks ( + id, + title, + external_id, + status, + ended_time, + merchant_id, + team_id, + task_type_id + ) ( + select + id, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, + floor(random() * 8) + 1 as status, + now() - (floor(random() * 730) * interval '1 day') as ended_time, + case + when random() < 0.5 then 1 + when random() < 0.5 then 2 + when random() < 0.5 then 3 + when random() < 0.5 then 4 + else 5 + end as merchant_id, + floor(random() * 250) + 1 as team_id, + floor(random() * 7) + 1 as task_type_id + from + generate_series(1, 1000000) as id + ); + +''' [teardown] statement_files = ["sql/bringg_teardown.sql"] From fa08dfc6b8e4decea863a1624d60839c15edc741 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 14:09:04 +0200 Subject: [PATCH 03/44] Add query to load data into way_points table --- specs/bringg.toml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/specs/bringg.toml b/specs/bringg.toml index 372c78e..5850fe0 100644 --- a/specs/bringg.toml +++ b/specs/bringg.toml @@ -34,7 +34,41 @@ insert into from generate_series(1, 1000000) as id ); +''' +[[queries]] +name="load-way_points" +concurrency=10 +statement = ''' +insert into + way_points ( + id, + task_id, + customer_id, + position, + no_earlier_than, + city, + address, + no_later_than + ) ( + with base as ( + select + id, + id / 2 as task_id, + floor(random() * 1000000) + 1 as customer_id, + id % 2 as position, + now() - (floor(random() * 730) * interval '1 day') as no_earlier_than, + ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, + ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address + from + generate_series(1, 2000000) as id + ) + select + *, + no_earlier_than + interval '1 day' as no_later_than + from + base + ); ''' [teardown] From 6a6b0487c12b4eabc7cb3dcb2d53c68bea4c4248 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 14:37:15 +0200 Subject: [PATCH 04/44] Add query to load data into customers table --- specs/bringg.toml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/specs/bringg.toml b/specs/bringg.toml index 5850fe0..4bd1d6a 100644 --- a/specs/bringg.toml +++ b/specs/bringg.toml @@ -2,8 +2,8 @@ statement_files = ["sql/bringg_setup.sql"] [[queries]] -name="load-tasks" -concurrency=10 +name = "load-tasks" +concurrency = 10 statement = ''' insert into tasks ( @@ -37,8 +37,27 @@ insert into ''' [[queries]] -name="load-way_points" -concurrency=10 +name = "load-customers" +concurrency = 10 +statement = ''' +insert into + customers ( + id, + name, + phone + ) ( + select + id, + ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, + ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone + from + generate_series(1, 1000000) as id + ); +''' + +[[queries]] +name = "load-way_points" +concurrency = 10 statement = ''' insert into way_points ( @@ -72,4 +91,4 @@ insert into ''' [teardown] - statement_files = ["sql/bringg_teardown.sql"] +statement_files = ["sql/bringg_teardown.sql"] From 173708383e3ccda33d5bcd3a4222ba792d92f887 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 14:38:16 +0200 Subject: [PATCH 05/44] Remove redundant concurrency --- specs/bringg.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/specs/bringg.toml b/specs/bringg.toml index 4bd1d6a..8ceaff8 100644 --- a/specs/bringg.toml +++ b/specs/bringg.toml @@ -3,7 +3,6 @@ statement_files = ["sql/bringg_setup.sql"] [[queries]] name = "load-tasks" -concurrency = 10 statement = ''' insert into tasks ( @@ -38,7 +37,6 @@ insert into [[queries]] name = "load-customers" -concurrency = 10 statement = ''' insert into customers ( @@ -57,7 +55,6 @@ insert into [[queries]] name = "load-way_points" -concurrency = 10 statement = ''' insert into way_points ( From 8f83821283ff01529459fe2633a95f3fb7325efe Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 15:00:49 +0200 Subject: [PATCH 06/44] Add queries for the no filters default case --- specs/{bringg.toml => bringg_small.toml} | 150 +++++++++++++++++++++++ 1 file changed, 150 insertions(+) rename specs/{bringg.toml => bringg_small.toml} (87%) diff --git a/specs/bringg.toml b/specs/bringg_small.toml similarity index 87% rename from specs/bringg.toml rename to specs/bringg_small.toml index 8ceaff8..dfe59c6 100644 --- a/specs/bringg.toml +++ b/specs/bringg_small.toml @@ -87,5 +87,155 @@ insert into ); ''' +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From ccd51110aeca5b99ccd905968283b4653ad1fd31 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 15:49:15 +0200 Subject: [PATCH 07/44] Add queries for the single team filter case --- specs/bringg_small.toml | 161 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index dfe59c6..5ab245e 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -237,5 +237,166 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From ea2c92f7c47a7e49c55a2d68cabc326e380c60b4 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 15:51:39 +0200 Subject: [PATCH 08/44] Add queries for the many teams filter case --- specs/bringg_small.toml | 161 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index 5ab245e..58855ee 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -398,5 +398,166 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + + +[[queries]] +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From cfada14709d2791b59c768d29933d3d917bb84ef Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 17:36:28 +0200 Subject: [PATCH 09/44] Add full_search_analyzer --- specs/sql/bringg_setup.sql | 20 +++++++++++++++++--- specs/sql/bringg_teardown.sql | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/specs/sql/bringg_setup.sql b/specs/sql/bringg_setup.sql index d72462f..5006d27 100644 --- a/specs/sql/bringg_setup.sql +++ b/specs/sql/bringg_setup.sql @@ -53,6 +53,17 @@ CREATE ANALYZER edge_ngram_phone_analyzer ( ) ); +CREATE ANALYZER whitespace_analyzer extends whitespace with ( + TOKEN_FILTERS ( + asciifolding, + lowercase, + length_min_2_chars with ( + type="length", + min=2 + ) + ) +); + create table customers ( id integer, name text, @@ -113,7 +124,8 @@ kind integer, 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 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') ); create table way_points ( @@ -212,7 +224,8 @@ 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 phone_ngram using fulltext (phone) with (analyzer='edge_ngram_phone_analyzer'), + INDEX zipcode_ignore using fulltext (zipcode) with (analyzer='full_search_analyzer') ); @@ -334,5 +347,6 @@ 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 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') ); diff --git a/specs/sql/bringg_teardown.sql b/specs/sql/bringg_teardown.sql index 02d55ec..f709c28 100644 --- a/specs/sql/bringg_teardown.sql +++ b/specs/sql/bringg_teardown.sql @@ -5,3 +5,4 @@ DROP ANALYZER ngram_lowercase_analyzer; DROP ANALYZER edge_ngram_lowercase_analyzer; DROP ANALYZER edge_ngram_full_field_analyzer; DROP ANALYZER edge_ngram_phone_analyzer; +DROP ANALYZER full_search_analyzer; From 884f152c62aaf8ad31ea362493af7e571727ef6f Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 17:36:40 +0200 Subject: [PATCH 10/44] Add queries filtering on first wp customer name --- specs/bringg_small.toml | 190 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index 58855ee..737077a 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -559,5 +559,195 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and position=1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and position = 1 + and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From 9b147b8d68ab3c6fc51d2326cdb2581194e103d2 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Tue, 18 Mar 2025 17:44:26 +0200 Subject: [PATCH 11/44] Add queries filtering on customer phone --- specs/bringg_small.toml | 182 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 181 insertions(+), 1 deletion(-) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index 737077a..c9df65d 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -571,7 +571,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 - and position=1 + and position = 1 and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') limit 26; @@ -749,5 +749,185 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From 173f96d287d567e0f58770fc74c3d981c866ac97 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 10:22:03 +0200 Subject: [PATCH 12/44] Change match type to phrase --- specs/bringg_small.toml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index c9df65d..9668264 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -572,7 +572,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -592,7 +592,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -612,7 +612,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -632,7 +632,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -652,7 +652,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -672,7 +672,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -690,7 +690,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -708,7 +708,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -726,7 +726,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -744,7 +744,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and position = 1 - and match(c.name_ngram, 'Ste') using best_fields with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -761,7 +761,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' @@ -780,7 +780,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' @@ -799,7 +799,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' @@ -818,7 +818,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' @@ -837,7 +837,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard') + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' @@ -856,7 +856,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' iterations = 1000 concurrency = 10 @@ -873,7 +873,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' iterations = 1000 concurrency = 10 @@ -890,7 +890,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' iterations = 1000 concurrency = 10 @@ -907,7 +907,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' iterations = 1000 concurrency = 10 @@ -924,7 +924,7 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 - and match(c.phone_ngram, '12027') using best_fields with (analyzer='standard'); + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' iterations = 1000 concurrency = 10 From c75c8bdef0209ca015129c131760858e26b2f142 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 10:28:21 +0200 Subject: [PATCH 13/44] Add queries filtering on waypoint time frame --- specs/bringg_small.toml | 189 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index 9668264..313f28d 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -929,5 +929,194 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From b38799792bee66516a0aadc2b4821403c0452014 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 10:50:59 +0200 Subject: [PATCH 14/44] Add full_search_ngram_analyzer analyzer --- specs/sql/bringg_setup.sql | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/specs/sql/bringg_setup.sql b/specs/sql/bringg_setup.sql index 5006d27..a24de21 100644 --- a/specs/sql/bringg_setup.sql +++ b/specs/sql/bringg_setup.sql @@ -53,7 +53,7 @@ CREATE ANALYZER edge_ngram_phone_analyzer ( ) ); -CREATE ANALYZER whitespace_analyzer extends whitespace with ( +CREATE ANALYZER full_search_analyzer extends whitespace with ( TOKEN_FILTERS ( asciifolding, lowercase, @@ -64,6 +64,13 @@ CREATE ANALYZER whitespace_analyzer extends whitespace with ( ) ); +CREATE ANALYZER full_search_ngram_analyzer extends keyword with ( + TOKEN_FILTERS ( + asciifolding, + lowercase + ) +); + create table customers ( id integer, name text, @@ -348,5 +355,6 @@ 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 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') ); From b6f1a4881f3497d57d2465d01ebbff1242c0dfb1 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 10:51:07 +0200 Subject: [PATCH 15/44] Format setup file --- specs/sql/bringg_setup.sql | 634 ++++++++++++++++++------------------- 1 file changed, 309 insertions(+), 325 deletions(-) diff --git a/specs/sql/bringg_setup.sql b/specs/sql/bringg_setup.sql index a24de21..93de474 100644 --- a/specs/sql/bringg_setup.sql +++ b/specs/sql/bringg_setup.sql @@ -1,360 +1,344 @@ CREATE ANALYZER ngram_lowercase_analyzer ( - TOKENIZER ngram_tokenizer with ( - min_gram=2, - max_gram=10, - type="ngram" - ), - TOKEN_FILTERS ( - asciifolding, - lowercase - ) + 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", + TOKENIZER edge_ngram_tokenizer with ( + min_gram = 2, + max_gram = 30, + type = "edge_ngram", + token_chars = ["letter", "digit", "symbol", "punctuation"] - ), - TOKEN_FILTERS ( - asciifolding, - lowercase - ) + ), + 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 - ) - ) + 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= [ + 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 - ) - ) + 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 - ) + 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') + 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') ); 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') + 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') ); - 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'), + 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') + 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') ); From 00e72c8b9e37fd8d4591222480a175ef1032d5fe Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 11:06:16 +0200 Subject: [PATCH 16/44] Remove redundant joins --- specs/bringg_small.toml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index 313f28d..2397168 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -955,7 +955,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' @@ -975,7 +974,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' @@ -995,7 +993,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' @@ -1015,7 +1012,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' @@ -1035,7 +1031,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' @@ -1053,7 +1048,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' @@ -1071,7 +1065,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' @@ -1089,7 +1082,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' @@ -1107,7 +1099,6 @@ statement = ''' from tasks t join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id where status IN (4,7) and ended_time > now() - interval '45 days' From a1a35b8dbe35c511741d5f7d50a586b754201c48 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 11:07:16 +0200 Subject: [PATCH 17/44] Add queries filtering on task title/external_id --- specs/bringg_small.toml | 190 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index 2397168..506c0e4 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -1109,5 +1109,195 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From d8500f68b4ff0a1cf9087796cd2c29a5d51780ac Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 12:15:36 +0200 Subject: [PATCH 18/44] Add names to queries --- specs/bringg_small.toml | 70 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index 506c0e4..fccfd78 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -88,6 +88,7 @@ insert into ''' [[queries]] +name = "New History Page Main Query - Merchant #1" statement = ''' select distinct id @@ -104,6 +105,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Merchant #2" statement = ''' select distinct id @@ -120,6 +122,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Merchant #3" statement = ''' select distinct id @@ -136,6 +139,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Merchant #4" statement = ''' select distinct id @@ -152,6 +156,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Merchant #5" statement = ''' select distinct id @@ -168,6 +173,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Merchant #1" statement = ''' select count(*) @@ -182,6 +188,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Merchant #2" statement = ''' select count(*) @@ -196,6 +203,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Merchant #3" statement = ''' select count(*) @@ -210,6 +218,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Merchant #4" statement = ''' select count(*) @@ -224,6 +233,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Merchant #5" statement = ''' select count(*) @@ -238,6 +248,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Single Team - Merchant #1" statement = ''' select distinct id @@ -255,6 +266,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Single Team - Merchant #2" statement = ''' select distinct id @@ -272,6 +284,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Single Team - Merchant #3" statement = ''' select distinct id @@ -289,6 +302,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Single Team - Merchant #4" statement = ''' select distinct id @@ -306,6 +320,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Single Team - Merchant #5" statement = ''' select distinct id @@ -323,6 +338,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Single Team - Merchant #1" statement = ''' select count(*) @@ -338,6 +354,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Single Team - Merchant #2" statement = ''' select count(*) @@ -353,6 +370,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Single Team - Merchant #3" statement = ''' select count(*) @@ -368,6 +386,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Single Team - Merchant #4" statement = ''' select count(*) @@ -384,6 +403,7 @@ concurrency = 10 [[queries]] +name = "New History Page Count Query - Single Team - Merchant #5" statement = ''' select count(*) @@ -399,6 +419,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Many Teams - Merchant #1" statement = ''' select distinct id @@ -416,6 +437,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Many Teams - Merchant #2" statement = ''' select distinct id @@ -433,6 +455,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Many Teams - Merchant #3" statement = ''' select distinct id @@ -450,6 +473,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Many Teams - Merchant #4" statement = ''' select distinct id @@ -467,6 +491,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Many Teams - Merchant #5" statement = ''' select distinct id @@ -484,6 +509,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Many Teams - Merchant #1" statement = ''' select count(*) @@ -499,6 +525,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Many Teams - Merchant #2" statement = ''' select count(*) @@ -514,6 +541,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Many Teams - Merchant #3" statement = ''' select count(*) @@ -529,6 +557,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Many Teams - Merchant #4" statement = ''' select count(*) @@ -545,6 +574,7 @@ concurrency = 10 [[queries]] +name = "New History Page Count Query - Many Teams - Merchant #5" statement = ''' select count(*) @@ -560,6 +590,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #1" statement = ''' select distinct t.id @@ -580,6 +611,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #2" statement = ''' select distinct t.id @@ -600,6 +632,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #3" statement = ''' select distinct t.id @@ -620,6 +653,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #4" statement = ''' select distinct t.id @@ -640,6 +674,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #5" statement = ''' select distinct t.id @@ -660,6 +695,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #1" statement = ''' select count(distinct t.id) @@ -678,6 +714,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #2" statement = ''' select count(distinct t.id) @@ -696,6 +733,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #3" statement = ''' select count(distinct t.id) @@ -714,6 +752,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #4" statement = ''' select count(distinct t.id) @@ -732,6 +771,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #5" statement = ''' select count(distinct t.id) @@ -750,6 +790,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #1" statement = ''' select distinct t.id @@ -769,6 +810,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #2" statement = ''' select distinct t.id @@ -788,6 +830,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #3" statement = ''' select distinct t.id @@ -807,6 +850,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #4" statement = ''' select distinct t.id @@ -826,6 +870,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #5" statement = ''' select distinct t.id @@ -845,6 +890,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #1" statement = ''' select count(distinct t.id) @@ -862,6 +908,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #2" statement = ''' select count(distinct t.id) @@ -879,6 +926,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #3" statement = ''' select count(distinct t.id) @@ -896,6 +944,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #4" statement = ''' select count(distinct t.id) @@ -913,6 +962,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #5" statement = ''' select count(distinct t.id) @@ -930,6 +980,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #1" statement = ''' select distinct t.id @@ -949,6 +1000,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #2" statement = ''' select distinct t.id @@ -968,6 +1020,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #3" statement = ''' select distinct t.id @@ -987,6 +1040,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #4" statement = ''' select distinct t.id @@ -1006,6 +1060,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #5" statement = ''' select distinct t.id @@ -1025,6 +1080,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #1" statement = ''' select count(distinct t.id) @@ -1042,6 +1098,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #2" statement = ''' select count(distinct t.id) @@ -1059,6 +1116,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #3" statement = ''' select count(distinct t.id) @@ -1076,6 +1134,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #4" statement = ''' select count(distinct t.id) @@ -1093,6 +1152,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #5" statement = ''' select count(distinct t.id) @@ -1110,6 +1170,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #1" statement = ''' select distinct t.id @@ -1130,6 +1191,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #2" statement = ''' select distinct t.id @@ -1150,6 +1212,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #3" statement = ''' select distinct t.id @@ -1170,6 +1233,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #4" statement = ''' select distinct t.id @@ -1190,6 +1254,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #5" statement = ''' select distinct t.id @@ -1210,6 +1275,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #1" statement = ''' select count(distinct t.id) @@ -1228,6 +1294,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #2" statement = ''' select count(distinct t.id) @@ -1246,6 +1313,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #3" statement = ''' select count(distinct t.id) @@ -1264,6 +1332,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #4" statement = ''' select count(distinct t.id) @@ -1282,6 +1351,7 @@ iterations = 1000 concurrency = 10 [[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #5" statement = ''' select count(distinct t.id) From 00e53fdb8d1b8abe90f3aa6e93c269501c707448 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 12:28:26 +0200 Subject: [PATCH 19/44] Normalize names --- specs/bringg_small.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index fccfd78..f85a0a3 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -2,7 +2,7 @@ statement_files = ["sql/bringg_setup.sql"] [[queries]] -name = "load-tasks" +name = "Load Tasks" statement = ''' insert into tasks ( @@ -36,7 +36,7 @@ insert into ''' [[queries]] -name = "load-customers" +name = "Load Customers" statement = ''' insert into customers ( @@ -54,7 +54,7 @@ insert into ''' [[queries]] -name = "load-way_points" +name = "Load Way Points" statement = ''' insert into way_points ( @@ -72,7 +72,7 @@ insert into id, id / 2 as task_id, floor(random() * 1000000) + 1 as customer_id, - id % 2 as position, + (id % 2) + 1 as position, now() - (floor(random() * 730) * interval '1 day') as no_earlier_than, ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address From 83c8d73254f2f8c4c236fd4fc938e32ad8e0c9c0 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 12:28:50 +0200 Subject: [PATCH 20/44] Add queries filtering on task_type_id and first wp city and second wp address --- specs/bringg_small.toml | 210 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index f85a0a3..bb40958 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -1369,5 +1369,215 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') + AND MATCH(wp2.address_ngram, 'South'); +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From 7572d01a75be4cacfbc9bd6d8ffe517ee1891bd1 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 12:35:38 +0200 Subject: [PATCH 21/44] Use correct analyzer for latest added queries --- specs/bringg_small.toml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index bb40958..f07691a 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -1383,8 +1383,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South') + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -1405,8 +1405,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South') + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -1427,8 +1427,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South') + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -1449,8 +1449,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South') + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -1471,8 +1471,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South') + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' @@ -1493,8 +1493,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South'); + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -1513,8 +1513,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South'); + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -1533,8 +1533,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South'); + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -1553,8 +1553,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South'); + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 @@ -1573,8 +1573,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') - AND MATCH(wp2.address_ngram, 'South'); + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' iterations = 1000 concurrency = 10 From 94df395c6ebf7c0d375123cd4bb70f87430378ee Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 12:39:55 +0200 Subject: [PATCH 22/44] Add queries filtering on customer phone and wp time frame --- specs/bringg_small.toml | 210 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index f07691a..bda8144 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -1579,5 +1579,215 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From e6e4ef5ce405d13d789a609fa2a56a7fe26a1206 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 13:23:50 +0200 Subject: [PATCH 23/44] Add queries filtering on customer phone and wp time frame and task title/external_id --- specs/bringg_small.toml | 250 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index bda8144..590653b 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -1789,5 +1789,255 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From da3e8eb7a9146670f887a03a7a386c129c4c6dc2 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 13:35:38 +0200 Subject: [PATCH 24/44] Add queries simulating the base case with unnecessary joins for comparison --- specs/bringg_small.toml | 180 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) diff --git a/specs/bringg_small.toml b/specs/bringg_small.toml index 590653b..7e3f479 100644 --- a/specs/bringg_small.toml +++ b/specs/bringg_small.toml @@ -2039,5 +2039,185 @@ statement = ''' iterations = 1000 concurrency = 10 +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 +''' +iterations = 1000 +concurrency = 10 + [teardown] statement_files = ["sql/bringg_teardown.sql"] From 6256b15203551144989326583da29673f38da35f Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 15:25:13 +0200 Subject: [PATCH 25/44] Move bringg benchmark related files to bringg folder --- specs/{ => bringg}/bringg_small.toml | 0 specs/{ => bringg}/sql/bringg_setup.sql | 0 specs/{ => bringg}/sql/bringg_teardown.sql | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename specs/{ => bringg}/bringg_small.toml (100%) rename specs/{ => bringg}/sql/bringg_setup.sql (100%) rename specs/{ => bringg}/sql/bringg_teardown.sql (100%) diff --git a/specs/bringg_small.toml b/specs/bringg/bringg_small.toml similarity index 100% rename from specs/bringg_small.toml rename to specs/bringg/bringg_small.toml diff --git a/specs/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql similarity index 100% rename from specs/sql/bringg_setup.sql rename to specs/bringg/sql/bringg_setup.sql diff --git a/specs/sql/bringg_teardown.sql b/specs/bringg/sql/bringg_teardown.sql similarity index 100% rename from specs/sql/bringg_teardown.sql rename to specs/bringg/sql/bringg_teardown.sql From df0b872f6d0e8ae1b2565159baa2c9dcaa5eafd3 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 15:26:22 +0200 Subject: [PATCH 26/44] Add bringg_medium spec with 10X data of small spec --- specs/bringg/bringg_medium.toml | 2223 +++++++++++++++++++++++++++++++ 1 file changed, 2223 insertions(+) create mode 100644 specs/bringg/bringg_medium.toml diff --git a/specs/bringg/bringg_medium.toml b/specs/bringg/bringg_medium.toml new file mode 100644 index 0000000..3fba77f --- /dev/null +++ b/specs/bringg/bringg_medium.toml @@ -0,0 +1,2223 @@ +[setup] +statement_files = ["sql/bringg_setup.sql"] + +[[queries]] +name = "Load Tasks" +statement = ''' +insert into + tasks ( + id, + title, + external_id, + status, + ended_time, + merchant_id, + team_id, + task_type_id + ) ( + select + id, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, + floor(random() * 8) + 1 as status, + now() - (floor(random() * 730) * interval '1 day') as ended_time, + case + when random() < 0.5 then 1 + when random() < 0.5 then 2 + when random() < 0.5 then 3 + when random() < 0.5 then 4 + else 5 + end as merchant_id, + floor(random() * 250) + 1 as team_id, + floor(random() * 7) + 1 as task_type_id + from + generate_series(1, 10000000) as id + ); +''' + +[[queries]] +name = "Load Customers" +statement = ''' +insert into + customers ( + id, + name, + phone + ) ( + select + id, + ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, + ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone + from + generate_series(1, 10000000) as id + ); +''' + +[[queries]] +name = "Load Way Points" +statement = ''' +insert into + way_points ( + id, + task_id, + customer_id, + position, + no_earlier_than, + city, + address, + no_later_than + ) ( + with base as ( + select + id, + id / 2 as task_id, + floor(random() * 10000000) + 1 as customer_id, + (id % 2) + 1 as position, + now() - (floor(random() * 730) * interval '1 day') as no_earlier_than, + ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, + ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address + from + generate_series(1, 20000000) as id + ) + select + *, + no_earlier_than + interval '1 day' as no_later_than + from + base + ); +''' + +[[queries]] +name = "New History Page Main Query - Merchant #1" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Merchant #2" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Merchant #3" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Merchant #4" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Merchant #5" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #1" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #2" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #3" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #4" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #5" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #1" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #2" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #3" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #4" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #5" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #1" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #2" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #3" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #4" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #5" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #1" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #2" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #3" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #4" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #5" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #1" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #2" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #3" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #4" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #5" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 +''' +iterations = 1000 +concurrency = 10 + +[teardown] +statement_files = ["sql/bringg_teardown.sql"] From 27c57ccf5b14b5d49b97245b3b5aa306ac1ea5a1 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Wed, 19 Mar 2025 15:26:54 +0200 Subject: [PATCH 27/44] Add bringg_large spec with 100X data of small spec --- specs/bringg/bringg_large.toml | 2223 ++++++++++++++++++++++++++++++++ 1 file changed, 2223 insertions(+) create mode 100644 specs/bringg/bringg_large.toml diff --git a/specs/bringg/bringg_large.toml b/specs/bringg/bringg_large.toml new file mode 100644 index 0000000..7e49686 --- /dev/null +++ b/specs/bringg/bringg_large.toml @@ -0,0 +1,2223 @@ +[setup] +statement_files = ["sql/bringg_setup.sql"] + +[[queries]] +name = "Load Tasks" +statement = ''' +insert into + tasks ( + id, + title, + external_id, + status, + ended_time, + merchant_id, + team_id, + task_type_id + ) ( + select + id, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, + floor(random() * 8) + 1 as status, + now() - (floor(random() * 730) * interval '1 day') as ended_time, + case + when random() < 0.5 then 1 + when random() < 0.5 then 2 + when random() < 0.5 then 3 + when random() < 0.5 then 4 + else 5 + end as merchant_id, + floor(random() * 250) + 1 as team_id, + floor(random() * 7) + 1 as task_type_id + from + generate_series(1, 100000000) as id + ); +''' + +[[queries]] +name = "Load Customers" +statement = ''' +insert into + customers ( + id, + name, + phone + ) ( + select + id, + ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, + ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone + from + generate_series(1, 100000000) as id + ); +''' + +[[queries]] +name = "Load Way Points" +statement = ''' +insert into + way_points ( + id, + task_id, + customer_id, + position, + no_earlier_than, + city, + address, + no_later_than + ) ( + with base as ( + select + id, + id / 2 as task_id, + floor(random() * 100000000) + 1 as customer_id, + (id % 2) + 1 as position, + now() - (floor(random() * 730) * interval '1 day') as no_earlier_than, + ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, + ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address + from + generate_series(1, 200000000) as id + ) + select + *, + no_earlier_than + interval '1 day' as no_later_than + from + base + ); +''' + +[[queries]] +name = "New History Page Main Query - Merchant #1" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Merchant #2" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Merchant #3" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Merchant #4" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Merchant #5" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #1" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #2" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #3" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #4" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #5" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #1" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #2" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #3" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #4" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Single Team - Merchant #5" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id = 6 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #1" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #2" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #3" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #4" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + + +[[queries]] +name = "New History Page Count Query - Single Team - Merchant #5" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id = 6 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #1" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #2" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #3" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #4" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Many Teams - Merchant #5" +statement = ''' + select + distinct id + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #1" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 1 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #2" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 2 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #3" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 3 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #4" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 4 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + + +[[queries]] +name = "New History Page Count Query - Many Teams - Merchant #5" +statement = ''' + select + count(*) + from + tasks + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and merchant_id = 5 + and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - First WP Customer Name - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - First WP Customer Name - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and position = 1 + and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - WP Time Frame - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - WP Time Frame - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Task Title/External ID - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Task Title/External ID - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp1 on wp1.task_id = t.id and wp1.position=1 + join way_points wp2 on wp2.task_id = t.id and wp2.position=2 + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and t.task_type_id=6 + AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') + AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours'; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ) + limit + 26; +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') + and wp.no_earlier_than <= now() - interval '30 hours' + and wp.no_later_than >= now() - interval '28 hours' + and ( + match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') + or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + ); +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #1" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #2" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #3" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #4" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Main Query - Unnecessary Joins - Merchant #5" +statement = ''' + select + distinct t.id + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 + limit + 26 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #1" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 1 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #2" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 2 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #3" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 3 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #4" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 4 +''' +iterations = 1000 +concurrency = 10 + +[[queries]] +name = "New History Page Count Query - Merchant #5" +statement = ''' + select + count(distinct t.id) + from + tasks t + join way_points wp on wp.task_id = t.id + join customers c on c.id = wp.customer_id + where + status IN (4,7) + and ended_time > now() - interval '45 days' + and t.merchant_id = 5 +''' +iterations = 1000 +concurrency = 10 + +[teardown] +statement_files = ["sql/bringg_teardown.sql"] From 63cd0f246609d885e038bd03ef00aafb8246b166 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Sun, 23 Mar 2025 12:02:58 +0200 Subject: [PATCH 28/44] Shard tables to 3 shards instead of default --- specs/bringg/sql/bringg_setup.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/bringg/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql index 93de474..69124d7 100644 --- a/specs/bringg/sql/bringg_setup.sql +++ b/specs/bringg/sql/bringg_setup.sql @@ -118,7 +118,7 @@ create table customers ( 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 3 shards; create table way_points ( id integer, @@ -218,7 +218,7 @@ create table way_points ( 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 3 shards; create table tasks ( id integer, @@ -341,4 +341,4 @@ create table tasks ( 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 3 shards; From 73ada9c9a5da48cf5e26814c7b1d6320b6777d2d Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Sun, 23 Mar 2025 12:29:50 +0200 Subject: [PATCH 29/44] Remove manual shard size selection --- specs/bringg/sql/bringg_setup.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/bringg/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql index 69124d7..93de474 100644 --- a/specs/bringg/sql/bringg_setup.sql +++ b/specs/bringg/sql/bringg_setup.sql @@ -118,7 +118,7 @@ create table customers ( 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 3 shards; +); create table way_points ( id integer, @@ -218,7 +218,7 @@ create table way_points ( 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 3 shards; +); create table tasks ( id integer, @@ -341,4 +341,4 @@ create table tasks ( 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 3 shards; +); From 42e4cd718598191eb0e7bed064e28c4a3919d9c8 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Mon, 24 Mar 2025 16:21:31 +0200 Subject: [PATCH 30/44] Increase granularity of wp timeframe --- specs/bringg/bringg_small.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/bringg/bringg_small.toml b/specs/bringg/bringg_small.toml index 7e3f479..9db878d 100644 --- a/specs/bringg/bringg_small.toml +++ b/specs/bringg/bringg_small.toml @@ -73,7 +73,7 @@ insert into id / 2 as task_id, floor(random() * 1000000) + 1 as customer_id, (id % 2) + 1 as position, - now() - (floor(random() * 730) * interval '1 day') as no_earlier_than, + now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address from @@ -81,7 +81,7 @@ insert into ) select *, - no_earlier_than + interval '1 day' as no_later_than + no_earlier_than + interval '6 hours' as no_later_than from base ); From d4e9b66defad062fdef8c6685690e488af88cbae Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 27 Mar 2025 13:12:12 +0200 Subject: [PATCH 31/44] Move tables loading to setup --- specs/bringg/bringg_small.toml | 86 ------------------------------- specs/bringg/sql/bringg_setup.sql | 76 +++++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 90 deletions(-) diff --git a/specs/bringg/bringg_small.toml b/specs/bringg/bringg_small.toml index 9db878d..7c9da6b 100644 --- a/specs/bringg/bringg_small.toml +++ b/specs/bringg/bringg_small.toml @@ -1,92 +1,6 @@ [setup] statement_files = ["sql/bringg_setup.sql"] -[[queries]] -name = "Load Tasks" -statement = ''' -insert into - tasks ( - id, - title, - external_id, - status, - ended_time, - merchant_id, - team_id, - task_type_id - ) ( - select - id, - ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, - ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, - floor(random() * 8) + 1 as status, - now() - (floor(random() * 730) * interval '1 day') as ended_time, - case - when random() < 0.5 then 1 - when random() < 0.5 then 2 - when random() < 0.5 then 3 - when random() < 0.5 then 4 - else 5 - end as merchant_id, - floor(random() * 250) + 1 as team_id, - floor(random() * 7) + 1 as task_type_id - from - generate_series(1, 1000000) as id - ); -''' - -[[queries]] -name = "Load Customers" -statement = ''' -insert into - customers ( - id, - name, - phone - ) ( - select - id, - ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, - ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone - from - generate_series(1, 1000000) as id - ); -''' - -[[queries]] -name = "Load Way Points" -statement = ''' -insert into - way_points ( - id, - task_id, - customer_id, - position, - no_earlier_than, - city, - address, - no_later_than - ) ( - with base as ( - select - id, - id / 2 as task_id, - floor(random() * 1000000) + 1 as customer_id, - (id % 2) + 1 as position, - now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, - ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, - ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address - from - generate_series(1, 2000000) as id - ) - select - *, - no_earlier_than + interval '6 hours' as no_later_than - from - base - ); -''' - [[queries]] name = "New History Page Main Query - Merchant #1" statement = ''' diff --git a/specs/bringg/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql index 93de474..624e9c5 100644 --- a/specs/bringg/sql/bringg_setup.sql +++ b/specs/bringg/sql/bringg_setup.sql @@ -52,9 +52,7 @@ CREATE ANALYZER full_search_analyzer extends whitespace with ( ) ); -CREATE ANALYZER full_search_ngram_analyzer extends keyword with ( - TOKEN_FILTERS (asciifolding, lowercase) -); +CREATE ANALYZER full_search_ngram_analyzer extends keyword with (TOKEN_FILTERS (asciifolding, lowercase)); create table customers ( id integer, @@ -341,4 +339,74 @@ create table tasks ( 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') -); + +insert into + tasks ( + id, + title, + external_id, + status, + ended_time, + merchant_id, + team_id, + task_type_id + ) ( + select + id, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, + floor(random() * 8) + 1 as status, + now() - (floor(random() * 730) * interval '1 day') as ended_time, + case + when random() < 0.5 then 1 + when random() < 0.5 then 2 + when random() < 0.5 then 3 + when random() < 0.5 then 4 + else 5 + end as merchant_id, + floor(random() * 250) + 1 as team_id, + floor(random() * 7) + 1 as task_type_id + from + generate_series(1, 1000000) as id + ); + +insert into + customers (id, name, phone) ( + select + id, + ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, + ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone + from + generate_series(1, 1000000) as id + ); + +insert into + way_points ( + id, + task_id, + customer_id, + position, + no_earlier_than, + city, + address, + no_later_than + ) ( + with base as ( + select + id, + id / 2 as task_id, + floor(random() * 1000000) + 1 as customer_id, + (id % 2) + 1 as position, + now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, + ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, + ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address + from + generate_series(1, 2000000) as id + ) + select + *, + no_earlier_than + interval '6 hours' as no_later_than + from + base + ); + From a9987201d2de7baed858a64ba80ed1d0618f1137 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 27 Mar 2025 13:13:03 +0200 Subject: [PATCH 32/44] Run analyze at the end of data ingestion --- specs/bringg/sql/bringg_setup.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/bringg/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql index 624e9c5..8ca4091 100644 --- a/specs/bringg/sql/bringg_setup.sql +++ b/specs/bringg/sql/bringg_setup.sql @@ -410,3 +410,4 @@ insert into base ); +ANALYZE; From 47a68a04bd22504a61d3e832e60013a2d83733af Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 27 Mar 2025 13:13:55 +0200 Subject: [PATCH 33/44] Reduce concurrency --- specs/bringg/bringg_small.toml | 440 ++++++++++++++++----------------- 1 file changed, 220 insertions(+), 220 deletions(-) diff --git a/specs/bringg/bringg_small.toml b/specs/bringg/bringg_small.toml index 7c9da6b..5a1fe65 100644 --- a/specs/bringg/bringg_small.toml +++ b/specs/bringg/bringg_small.toml @@ -15,8 +15,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #2" @@ -32,8 +32,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #3" @@ -49,8 +49,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #4" @@ -66,8 +66,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #5" @@ -83,8 +83,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #1" @@ -98,8 +98,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 1 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #2" @@ -113,8 +113,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 2 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #3" @@ -128,8 +128,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 3 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #4" @@ -143,8 +143,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 4 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #5" @@ -158,8 +158,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 5 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #1" @@ -176,8 +176,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #2" @@ -194,8 +194,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #3" @@ -212,8 +212,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #4" @@ -230,8 +230,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #5" @@ -248,8 +248,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #1" @@ -264,8 +264,8 @@ statement = ''' and merchant_id = 1 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #2" @@ -280,8 +280,8 @@ statement = ''' and merchant_id = 2 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #3" @@ -296,8 +296,8 @@ statement = ''' and merchant_id = 3 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #4" @@ -312,8 +312,8 @@ statement = ''' and merchant_id = 4 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] @@ -329,8 +329,8 @@ statement = ''' and merchant_id = 5 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #1" @@ -347,8 +347,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #2" @@ -365,8 +365,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #3" @@ -383,8 +383,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #4" @@ -401,8 +401,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #5" @@ -419,8 +419,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #1" @@ -435,8 +435,8 @@ statement = ''' and merchant_id = 1 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #2" @@ -451,8 +451,8 @@ statement = ''' and merchant_id = 2 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #3" @@ -467,8 +467,8 @@ statement = ''' and merchant_id = 3 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #4" @@ -483,8 +483,8 @@ statement = ''' and merchant_id = 4 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] @@ -500,8 +500,8 @@ statement = ''' and merchant_id = 5 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #1" @@ -521,8 +521,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #2" @@ -542,8 +542,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #3" @@ -563,8 +563,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #4" @@ -584,8 +584,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #5" @@ -605,8 +605,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #1" @@ -624,8 +624,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #2" @@ -643,8 +643,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #3" @@ -662,8 +662,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #4" @@ -681,8 +681,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #5" @@ -700,8 +700,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #1" @@ -720,8 +720,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #2" @@ -740,8 +740,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #3" @@ -760,8 +760,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #4" @@ -780,8 +780,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #5" @@ -800,8 +800,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #1" @@ -818,8 +818,8 @@ statement = ''' and t.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #2" @@ -836,8 +836,8 @@ statement = ''' and t.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #3" @@ -854,8 +854,8 @@ statement = ''' and t.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #4" @@ -872,8 +872,8 @@ statement = ''' and t.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #5" @@ -890,8 +890,8 @@ statement = ''' and t.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #1" @@ -910,8 +910,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #2" @@ -930,8 +930,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #3" @@ -950,8 +950,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #4" @@ -970,8 +970,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #5" @@ -990,8 +990,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #1" @@ -1008,8 +1008,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #2" @@ -1026,8 +1026,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #3" @@ -1044,8 +1044,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #4" @@ -1062,8 +1062,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #5" @@ -1080,8 +1080,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #1" @@ -1101,8 +1101,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #2" @@ -1122,8 +1122,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #3" @@ -1143,8 +1143,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #4" @@ -1164,8 +1164,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #5" @@ -1185,8 +1185,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #1" @@ -1204,8 +1204,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #2" @@ -1223,8 +1223,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #3" @@ -1242,8 +1242,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #4" @@ -1261,8 +1261,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #5" @@ -1280,8 +1280,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" @@ -1302,8 +1302,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #2" @@ -1324,8 +1324,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #3" @@ -1346,8 +1346,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #4" @@ -1368,8 +1368,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #5" @@ -1390,8 +1390,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #1" @@ -1410,8 +1410,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #2" @@ -1430,8 +1430,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #3" @@ -1450,8 +1450,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #4" @@ -1470,8 +1470,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #5" @@ -1490,8 +1490,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #1" @@ -1512,8 +1512,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #2" @@ -1534,8 +1534,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #3" @@ -1556,8 +1556,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #4" @@ -1578,8 +1578,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #5" @@ -1600,8 +1600,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #1" @@ -1620,8 +1620,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #2" @@ -1640,8 +1640,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #3" @@ -1660,8 +1660,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #4" @@ -1680,8 +1680,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #5" @@ -1700,8 +1700,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" @@ -1726,8 +1726,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" @@ -1752,8 +1752,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" @@ -1778,8 +1778,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" @@ -1804,8 +1804,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" @@ -1830,8 +1830,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" @@ -1854,8 +1854,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" @@ -1878,8 +1878,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" @@ -1902,8 +1902,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" @@ -1926,8 +1926,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" @@ -1950,8 +1950,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #1" @@ -1969,8 +1969,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #2" @@ -1988,8 +1988,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #3" @@ -2007,8 +2007,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #4" @@ -2026,8 +2026,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #5" @@ -2045,8 +2045,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #1" @@ -2062,8 +2062,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #2" @@ -2079,8 +2079,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #3" @@ -2096,8 +2096,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #4" @@ -2113,8 +2113,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #5" @@ -2130,8 +2130,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [teardown] statement_files = ["sql/bringg_teardown.sql"] From f74b200f3af972dd0560553d92445bbc488af964 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 27 Mar 2025 13:18:36 +0200 Subject: [PATCH 34/44] Extract tables loading to another file --- specs/bringg/bringg_large.toml | 2 +- specs/bringg/bringg_medium.toml | 2 +- specs/bringg/bringg_small.toml | 2 +- specs/bringg/sql/bringg_setup.sql | 77 +------------------ .../sql/bringg_tables_ingestion_large.sql | 71 +++++++++++++++++ .../sql/bringg_tables_ingestion_medium.sql | 71 +++++++++++++++++ .../sql/bringg_tables_ingestion_small.sql | 71 +++++++++++++++++ 7 files changed, 219 insertions(+), 77 deletions(-) create mode 100644 specs/bringg/sql/bringg_tables_ingestion_large.sql create mode 100644 specs/bringg/sql/bringg_tables_ingestion_medium.sql create mode 100644 specs/bringg/sql/bringg_tables_ingestion_small.sql diff --git a/specs/bringg/bringg_large.toml b/specs/bringg/bringg_large.toml index 7e49686..2765b38 100644 --- a/specs/bringg/bringg_large.toml +++ b/specs/bringg/bringg_large.toml @@ -1,5 +1,5 @@ [setup] -statement_files = ["sql/bringg_setup.sql"] +statement_files = ["sql/bringg_setup.sql", "sql/bringg_tables_ingestion_large.sql"] [[queries]] name = "Load Tasks" diff --git a/specs/bringg/bringg_medium.toml b/specs/bringg/bringg_medium.toml index 3fba77f..8c04df2 100644 --- a/specs/bringg/bringg_medium.toml +++ b/specs/bringg/bringg_medium.toml @@ -1,5 +1,5 @@ [setup] -statement_files = ["sql/bringg_setup.sql"] +statement_files = ["sql/bringg_setup.sql", "sql/bringg_tables_ingestion_medium.sql"] [[queries]] name = "Load Tasks" diff --git a/specs/bringg/bringg_small.toml b/specs/bringg/bringg_small.toml index 5a1fe65..da57faa 100644 --- a/specs/bringg/bringg_small.toml +++ b/specs/bringg/bringg_small.toml @@ -1,5 +1,5 @@ [setup] -statement_files = ["sql/bringg_setup.sql"] +statement_files = ["sql/bringg_setup.sql", "sql/bringg_tables_ingestion_small.sql"] [[queries]] name = "New History Page Main Query - Merchant #1" diff --git a/specs/bringg/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql index 8ca4091..91f90e1 100644 --- a/specs/bringg/sql/bringg_setup.sql +++ b/specs/bringg/sql/bringg_setup.sql @@ -116,7 +116,7 @@ create table customers ( 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 3 shards; create table way_points ( id integer, @@ -216,7 +216,7 @@ create table way_points ( 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 3 shards; create table tasks ( id integer, @@ -339,75 +339,4 @@ create table tasks ( 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') - -insert into - tasks ( - id, - title, - external_id, - status, - ended_time, - merchant_id, - team_id, - task_type_id - ) ( - select - id, - ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, - ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, - floor(random() * 8) + 1 as status, - now() - (floor(random() * 730) * interval '1 day') as ended_time, - case - when random() < 0.5 then 1 - when random() < 0.5 then 2 - when random() < 0.5 then 3 - when random() < 0.5 then 4 - else 5 - end as merchant_id, - floor(random() * 250) + 1 as team_id, - floor(random() * 7) + 1 as task_type_id - from - generate_series(1, 1000000) as id - ); - -insert into - customers (id, name, phone) ( - select - id, - ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, - ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone - from - generate_series(1, 1000000) as id - ); - -insert into - way_points ( - id, - task_id, - customer_id, - position, - no_earlier_than, - city, - address, - no_later_than - ) ( - with base as ( - select - id, - id / 2 as task_id, - floor(random() * 1000000) + 1 as customer_id, - (id % 2) + 1 as position, - now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, - ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, - ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address - from - generate_series(1, 2000000) as id - ) - select - *, - no_earlier_than + interval '6 hours' as no_later_than - from - base - ); - -ANALYZE; +) clustered into 3 shards; diff --git a/specs/bringg/sql/bringg_tables_ingestion_large.sql b/specs/bringg/sql/bringg_tables_ingestion_large.sql new file mode 100644 index 0000000..433cc9b --- /dev/null +++ b/specs/bringg/sql/bringg_tables_ingestion_large.sql @@ -0,0 +1,71 @@ +insert into + tasks ( + id, + title, + external_id, + status, + ended_time, + merchant_id, + team_id, + task_type_id + ) ( + select + id, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, + floor(random() * 8) + 1 as status, + now() - (floor(random() * 730) * interval '1 day') as ended_time, + case + when random() < 0.5 then 1 + when random() < 0.5 then 2 + when random() < 0.5 then 3 + when random() < 0.5 then 4 + else 5 + end as merchant_id, + floor(random() * 250) + 1 as team_id, + floor(random() * 7) + 1 as task_type_id + from + generate_series(1, 100000000) as id + ); + +insert into + customers (id, name, phone) ( + select + id, + ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, + ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone + from + generate_series(1, 100000000) as id + ); + +insert into + way_points ( + id, + task_id, + customer_id, + position, + no_earlier_than, + city, + address, + no_later_than + ) ( + with base as ( + select + id, + id / 2 as task_id, + floor(random() * 100000000) + 1 as customer_id, + (id % 2) + 1 as position, + now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, + ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, + ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address + from + generate_series(1, 200000000) as id + ) + select + *, + no_earlier_than + interval '6 hours' as no_later_than + from + base + ); + +ANALYZE; diff --git a/specs/bringg/sql/bringg_tables_ingestion_medium.sql b/specs/bringg/sql/bringg_tables_ingestion_medium.sql new file mode 100644 index 0000000..1f62ccc --- /dev/null +++ b/specs/bringg/sql/bringg_tables_ingestion_medium.sql @@ -0,0 +1,71 @@ +insert into + tasks ( + id, + title, + external_id, + status, + ended_time, + merchant_id, + team_id, + task_type_id + ) ( + select + id, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, + floor(random() * 8) + 1 as status, + now() - (floor(random() * 730) * interval '1 day') as ended_time, + case + when random() < 0.5 then 1 + when random() < 0.5 then 2 + when random() < 0.5 then 3 + when random() < 0.5 then 4 + else 5 + end as merchant_id, + floor(random() * 250) + 1 as team_id, + floor(random() * 7) + 1 as task_type_id + from + generate_series(1, 10000000) as id + ); + +insert into + customers (id, name, phone) ( + select + id, + ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, + ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone + from + generate_series(1, 10000000) as id + ); + +insert into + way_points ( + id, + task_id, + customer_id, + position, + no_earlier_than, + city, + address, + no_later_than + ) ( + with base as ( + select + id, + id / 2 as task_id, + floor(random() * 10000000) + 1 as customer_id, + (id % 2) + 1 as position, + now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, + ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, + ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address + from + generate_series(1, 20000000) as id + ) + select + *, + no_earlier_than + interval '6 hours' as no_later_than + from + base + ); + +ANALYZE; diff --git a/specs/bringg/sql/bringg_tables_ingestion_small.sql b/specs/bringg/sql/bringg_tables_ingestion_small.sql new file mode 100644 index 0000000..f606837 --- /dev/null +++ b/specs/bringg/sql/bringg_tables_ingestion_small.sql @@ -0,0 +1,71 @@ +insert into + tasks ( + id, + title, + external_id, + status, + ended_time, + merchant_id, + team_id, + task_type_id + ) ( + select + id, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, + ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, + floor(random() * 8) + 1 as status, + now() - (floor(random() * 730) * interval '1 day') as ended_time, + case + when random() < 0.5 then 1 + when random() < 0.5 then 2 + when random() < 0.5 then 3 + when random() < 0.5 then 4 + else 5 + end as merchant_id, + floor(random() * 250) + 1 as team_id, + floor(random() * 7) + 1 as task_type_id + from + generate_series(1, 1000000) as id + ); + +insert into + customers (id, name, phone) ( + select + id, + ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, + ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone + from + generate_series(1, 1000000) as id + ); + +insert into + way_points ( + id, + task_id, + customer_id, + position, + no_earlier_than, + city, + address, + no_later_than + ) ( + with base as ( + select + id, + id / 2 as task_id, + floor(random() * 1000000) + 1 as customer_id, + (id % 2) + 1 as position, + now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, + ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, + ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address + from + generate_series(1, 2000000) as id + ) + select + *, + no_earlier_than + interval '6 hours' as no_later_than + from + base + ); + +ANALYZE; From 2413ac77f45c9f9976dad10a32b0af47b4cd0f2c Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 27 Mar 2025 13:20:11 +0200 Subject: [PATCH 35/44] Remove explicit sharding --- specs/bringg/bringg_large.toml | 531 +++++++++++++----------------- specs/bringg/bringg_medium.toml | 91 +---- specs/bringg/sql/bringg_setup.sql | 6 +- 3 files changed, 231 insertions(+), 397 deletions(-) diff --git a/specs/bringg/bringg_large.toml b/specs/bringg/bringg_large.toml index 2765b38..c1749cd 100644 --- a/specs/bringg/bringg_large.toml +++ b/specs/bringg/bringg_large.toml @@ -1,91 +1,8 @@ [setup] -statement_files = ["sql/bringg_setup.sql", "sql/bringg_tables_ingestion_large.sql"] - -[[queries]] -name = "Load Tasks" -statement = ''' -insert into - tasks ( - id, - title, - external_id, - status, - ended_time, - merchant_id, - team_id, - task_type_id - ) ( - select - id, - ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, - ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, - floor(random() * 8) + 1 as status, - now() - (floor(random() * 730) * interval '1 day') as ended_time, - case - when random() < 0.5 then 1 - when random() < 0.5 then 2 - when random() < 0.5 then 3 - when random() < 0.5 then 4 - else 5 - end as merchant_id, - floor(random() * 250) + 1 as team_id, - floor(random() * 7) + 1 as task_type_id - from - generate_series(1, 100000000) as id - ); -''' - -[[queries]] -name = "Load Customers" -statement = ''' -insert into - customers ( - id, - name, - phone - ) ( - select - id, - ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, - ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone - from - generate_series(1, 100000000) as id - ); -''' - -[[queries]] -name = "Load Way Points" -statement = ''' -insert into - way_points ( - id, - task_id, - customer_id, - position, - no_earlier_than, - city, - address, - no_later_than - ) ( - with base as ( - select - id, - id / 2 as task_id, - floor(random() * 100000000) + 1 as customer_id, - (id % 2) + 1 as position, - now() - (floor(random() * 730) * interval '1 day') as no_earlier_than, - ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, - ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address - from - generate_series(1, 200000000) as id - ) - select - *, - no_earlier_than + interval '1 day' as no_later_than - from - base - ); -''' +statement_files = [ + "sql/bringg_setup.sql", + "sql/bringg_tables_ingestion_large.sql", +] [[queries]] name = "New History Page Main Query - Merchant #1" @@ -101,8 +18,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #2" @@ -118,8 +35,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #3" @@ -135,8 +52,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #4" @@ -152,8 +69,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #5" @@ -169,8 +86,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #1" @@ -184,8 +101,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 1 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #2" @@ -199,8 +116,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 2 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #3" @@ -214,8 +131,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 3 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #4" @@ -229,8 +146,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 4 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #5" @@ -244,8 +161,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 5 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #1" @@ -262,8 +179,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #2" @@ -280,8 +197,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #3" @@ -298,8 +215,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #4" @@ -316,8 +233,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #5" @@ -334,8 +251,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #1" @@ -350,8 +267,8 @@ statement = ''' and merchant_id = 1 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #2" @@ -366,8 +283,8 @@ statement = ''' and merchant_id = 2 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #3" @@ -382,8 +299,8 @@ statement = ''' and merchant_id = 3 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #4" @@ -398,8 +315,8 @@ statement = ''' and merchant_id = 4 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] @@ -415,8 +332,8 @@ statement = ''' and merchant_id = 5 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #1" @@ -433,8 +350,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #2" @@ -451,8 +368,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #3" @@ -469,8 +386,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #4" @@ -487,8 +404,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #5" @@ -505,8 +422,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #1" @@ -521,8 +438,8 @@ statement = ''' and merchant_id = 1 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #2" @@ -537,8 +454,8 @@ statement = ''' and merchant_id = 2 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #3" @@ -553,8 +470,8 @@ statement = ''' and merchant_id = 3 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #4" @@ -569,8 +486,8 @@ statement = ''' and merchant_id = 4 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] @@ -586,8 +503,8 @@ statement = ''' and merchant_id = 5 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #1" @@ -607,8 +524,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #2" @@ -628,8 +545,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #3" @@ -649,8 +566,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #4" @@ -670,8 +587,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #5" @@ -691,8 +608,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #1" @@ -710,8 +627,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #2" @@ -729,8 +646,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #3" @@ -748,8 +665,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #4" @@ -767,8 +684,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #5" @@ -786,8 +703,8 @@ statement = ''' and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #1" @@ -806,8 +723,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #2" @@ -826,8 +743,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #3" @@ -846,8 +763,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #4" @@ -866,8 +783,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #5" @@ -886,8 +803,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #1" @@ -904,8 +821,8 @@ statement = ''' and t.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #2" @@ -922,8 +839,8 @@ statement = ''' and t.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #3" @@ -940,8 +857,8 @@ statement = ''' and t.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #4" @@ -958,8 +875,8 @@ statement = ''' and t.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #5" @@ -976,8 +893,8 @@ statement = ''' and t.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #1" @@ -996,8 +913,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #2" @@ -1016,8 +933,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #3" @@ -1036,8 +953,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #4" @@ -1056,8 +973,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #5" @@ -1076,8 +993,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #1" @@ -1094,8 +1011,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #2" @@ -1112,8 +1029,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #3" @@ -1130,8 +1047,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #4" @@ -1148,8 +1065,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #5" @@ -1166,8 +1083,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #1" @@ -1187,8 +1104,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #2" @@ -1208,8 +1125,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #3" @@ -1229,8 +1146,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #4" @@ -1250,8 +1167,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #5" @@ -1271,8 +1188,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #1" @@ -1290,8 +1207,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #2" @@ -1309,8 +1226,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #3" @@ -1328,8 +1245,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #4" @@ -1347,8 +1264,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #5" @@ -1366,8 +1283,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" @@ -1388,8 +1305,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #2" @@ -1410,8 +1327,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #3" @@ -1432,8 +1349,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #4" @@ -1454,8 +1371,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #5" @@ -1476,8 +1393,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #1" @@ -1496,8 +1413,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #2" @@ -1516,8 +1433,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #3" @@ -1536,8 +1453,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #4" @@ -1556,8 +1473,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #5" @@ -1576,8 +1493,8 @@ statement = ''' AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #1" @@ -1598,8 +1515,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #2" @@ -1620,8 +1537,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #3" @@ -1642,8 +1559,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #4" @@ -1664,8 +1581,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #5" @@ -1686,8 +1603,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #1" @@ -1706,8 +1623,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #2" @@ -1726,8 +1643,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #3" @@ -1746,8 +1663,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #4" @@ -1766,8 +1683,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #5" @@ -1786,8 +1703,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" @@ -1812,8 +1729,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" @@ -1838,8 +1755,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" @@ -1864,8 +1781,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" @@ -1890,8 +1807,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" @@ -1916,8 +1833,8 @@ statement = ''' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" @@ -1940,8 +1857,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" @@ -1964,8 +1881,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" @@ -1988,8 +1905,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" @@ -2012,8 +1929,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" @@ -2036,8 +1953,8 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #1" @@ -2055,8 +1972,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #2" @@ -2074,8 +1991,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #3" @@ -2093,8 +2010,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #4" @@ -2112,8 +2029,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #5" @@ -2131,8 +2048,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #1" @@ -2148,8 +2065,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #2" @@ -2165,8 +2082,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #3" @@ -2182,8 +2099,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #4" @@ -2199,8 +2116,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #5" @@ -2216,8 +2133,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 ''' -iterations = 1000 -concurrency = 10 +iterations = 50 +concurrency = 2 [teardown] statement_files = ["sql/bringg_teardown.sql"] diff --git a/specs/bringg/bringg_medium.toml b/specs/bringg/bringg_medium.toml index 8c04df2..0a97527 100644 --- a/specs/bringg/bringg_medium.toml +++ b/specs/bringg/bringg_medium.toml @@ -1,91 +1,8 @@ [setup] -statement_files = ["sql/bringg_setup.sql", "sql/bringg_tables_ingestion_medium.sql"] - -[[queries]] -name = "Load Tasks" -statement = ''' -insert into - tasks ( - id, - title, - external_id, - status, - ended_time, - merchant_id, - team_id, - task_type_id - ) ( - select - id, - ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as title, - ['Stacy Jacobs', 'Amy Scott', 'Michelle Reyes', 'James Gregory', 'Craig Ross', 'Leslie Rodriguez', 'Paige Hill', 'Brandon Martinez', 'David Molina', 'Charles Lawson', 'Mary Flores', 'Cheryl Campbell', 'Margaret Hughes', 'Clayton Rangel', 'Nicole Flores', 'Mr. Travis Phelps', 'Sarah White', 'Jessica Villarreal', 'David Lee', 'Taylor Smith', 'Kimberly Hammond', 'Kevin Harris', 'Michael Gutierrez', 'Tamara Chen', 'Douglas Gomez', 'William Grimes', 'Wanda Peterson', 'Tiffany Hawkins', 'Danielle Miller', 'Brittany Jackson', 'Joseph Gardner', 'Sylvia Sellers', 'Katherine Smith', 'Elizabeth Baker', 'Lacey Allen', 'Jennifer Chavez', 'Jennifer Mullins', 'Denise Lyons', 'Phillip Fox', 'Alan Caldwell', 'Michael Flowers', 'Brian Mann', 'Julia Brown', 'Seth Thompson', 'Ryan Floyd', 'David Krueger', 'Amber Anderson', 'Mark Pearson', 'Sarah Jones', 'Daniel Anderson', 'Colleen Kaiser', 'Lisa Young', 'Trevor Garza', 'Alyssa Gray', 'Jennifer Mora', 'Elizabeth Bryant', 'Dana Gonzalez', 'Gary Whitney', 'Lisa Martin', 'Linda Mann', 'Michael Campbell', 'Samuel Mason', 'Scott Gordon', 'Lee Howell', 'Kathleen Duncan', 'Austin Davidson', 'Jessica Williams', 'Emily Richardson', 'Theresa Campbell', 'Michael Carney', 'Jennifer Keller', 'Mr. Charles Clark', 'Helen Valentine', 'James Lowery', 'Connor Johnson', 'Taylor Frye', 'Eric Thompson', 'Jordan Barnes', 'Nicholas Richards', 'Michelle Miller', 'Charles Whitaker', 'Mariah Dillon', 'Tamara Woodard', 'Jeffrey Gonzalez', 'Troy Munoz', 'Adam Nelson', 'Louis Frye', 'Rachel Mcdaniel', 'Sara Riley', 'William Smith', 'David Smith Jr.', 'Michael Hamilton', 'Matthew Rose II', 'Teresa Edwards', 'Sean Soto', 'Kathy Smith', 'Brent Jenkins', 'Justin Parker', 'Jason Boyd', 'Michele Evans'] [floor(random()*100)+1] as external_id, - floor(random() * 8) + 1 as status, - now() - (floor(random() * 730) * interval '1 day') as ended_time, - case - when random() < 0.5 then 1 - when random() < 0.5 then 2 - when random() < 0.5 then 3 - when random() < 0.5 then 4 - else 5 - end as merchant_id, - floor(random() * 250) + 1 as team_id, - floor(random() * 7) + 1 as task_type_id - from - generate_series(1, 10000000) as id - ); -''' - -[[queries]] -name = "Load Customers" -statement = ''' -insert into - customers ( - id, - name, - phone - ) ( - select - id, - ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, - ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone - from - generate_series(1, 10000000) as id - ); -''' - -[[queries]] -name = "Load Way Points" -statement = ''' -insert into - way_points ( - id, - task_id, - customer_id, - position, - no_earlier_than, - city, - address, - no_later_than - ) ( - with base as ( - select - id, - id / 2 as task_id, - floor(random() * 10000000) + 1 as customer_id, - (id % 2) + 1 as position, - now() - (floor(random() * 730) * interval '1 day') as no_earlier_than, - ['New Janetshire', 'Lake Amandaville', 'Lake David', 'East Mark', 'Sarahberg', 'North David', 'North Matthew', 'Lake Jeffreyberg', 'Lake Dianaville', 'Stephenshaven', 'Alanbury', 'Reedfurt', 'New Eugenechester', 'New Danielstad', 'Port Brandon', 'Pettyshire', 'Lisaberg', 'Lake Margaretfort', 'Smithstad', 'Smithside', 'East Jimmy', 'Markhaven', 'West Kristinafort', 'Fryeborough', 'Thomasborough', 'North Jenniferberg', 'Donnaton', 'Sandershaven', 'Morganchester', 'Lake Austinmouth', 'New Lisamouth', 'West Victoria', 'Wandachester', 'Ramosborough', 'Kempbury', 'Port Suzannefort', 'Fordstad', 'North Andrewbury', 'Port Robert', 'Brianland', 'Kimberlymouth', 'Brightstad', 'North Jessica', 'New Elizabeth', 'Lake Kyleburgh', 'Deantown', 'New Julie', 'New Davidview', 'Howardfort', 'Nathantown', 'Leonardside', 'Derekport', 'Stephanieport', 'West Sarah', 'Smithberg', 'Martinfort', 'Lewisside', 'Brookschester', 'East Shane', 'Tarafort', 'Juliebury', 'North Jennifer', 'South Brandon', 'Traceyview', 'Amyhaven', 'South Anthony', 'Lake Latoyaburgh', 'Kyleville', 'Jenniferstad', 'Port Bryanburgh', 'Port Kenneth', 'Chapmanburgh', 'Santosmouth', 'Williehaven', 'New Kristyshire', 'Lake Seanfurt', 'South Elizabeth', 'Thomasburgh', 'East Crystal', 'West Tracy', 'West Donaldland', 'Watkinsstad', 'Hermanfurt', 'New Allison', 'Port Timothy', 'West Catherinehaven', 'Michelefort', 'Lake Christopher', 'East Patriciabury', 'Davidsonland', 'South Jeffview', 'New Joel', 'North Danatown', 'Hobbsburgh', 'East Brandyborough', 'Lake Michele', 'Edwardsfurt', 'Port Thomasstad', 'West Amyport', 'Lake Samuel'] [floor(random()*100)+1] as city, - ['1559 James Mission Suite 799 South Elizabeth, PA 25984', '446 Wilkinson Branch East Cherylfort, CO 56487', '994 Mills Glen Apt. 776 Hoganhaven, SD 70785', '011 Sanders Roads Apt. 817 Roberttown, WV 68487', '35508 Nichols Lock Johnsonbury, MA 58470', '38616 Brown Village Ryanview, GA 58855', '59456 Clark Spur Suite 312 West Joseph, LA 92206', '588 Friedman Motorway Port Wendy, TN 07145', '39386 Guzman Court Apt. 024 North Matthew, LA 96836', 'PSC 9993, Box 6408 APO AA 94620', '54478 Castillo Lane Suite 507 Lake Christian, IL 06875', '83403 Richard View Apt. 850 West Charles, VT 07965', '06934 Bishop Extension Apt. 811 Port Cameronchester, CT 15436', '590 Valencia Dam East Christopher, CO 30810', '143 Martin Drive West Allisonbury, TN 09619', '942 Tammy Park Lake Gregory, WA 01805', '11761 Jennifer Point Apt. 604 Lake Ryanstad, ND 31739', '5563 Jill Crescent South Thomas, DC 45478', '910 Courtney Way Apt. 642 East Christopher, ID 85974', '497 White Fords North Williamtown, RI 47752', '197 Wang Light Suite 531 Amystad, OK 47697', '6930 Rivers Road Baldwinfurt, LA 68268', '11222 Roberts Wall Suite 048 West Courtney, WV 93321', '48431 Cheryl Mall Apt. 331 Woodport, DC 26087', '342 Ray Plaza Suite 029 Lake Juliebury, WV 00621', '4555 Martin Plaza Apt. 505 East Kristinemouth, HI 28381', '677 Baker Alley Apt. 960 North Matthewton, LA 12047', '83458 Summers Views West Randy, VA 38239', '6727 Natasha Ranch Lake Jackport, MD 50942', '0628 Moore Pines New Philipbury, KY 76375', '930 Williams Knoll Apt. 853 East Jose, HI 19945', '65772 Chelsea Court Sanfordstad, NC 01028', '75755 Erica Wall South Johnburgh, VA 97669', '01272 Anna Corner Apt. 741 Teresaberg, UT 27889', '004 Mary Cove Apt. 180 Youngside, MD 83526', 'PSC 1046, Box 8587 APO AA 24815', '9702 Nicholas Coves Suite 331 Solomonland, ME 01847', 'PSC 5170, Box 3413 APO AP 07662', '90309 Jeffrey Meadow Robertsmouth, AL 72339', '4810 Jonathan Port Apt. 482 Smithberg, MD 05882', '03994 Arnold Bridge South Jerrymouth, RI 20351', '187 Jones Fork Apt. 222 Colestad, NC 91203', '2193 Perry Pass Apt. 472 West Whitneyton, MN 04514', '148 Cheryl Village Suite 073 Port Robertshire, MN 74227', '4003 Crystal Cape South Tyler, SD 05261', '037 Richard Ville Kathrynhaven, DC 85145', '7538 Nash Parkway Apt. 383 South Ericafurt, AZ 29324', '917 Frazier Turnpike Apt. 877 Kerrymouth, CT 20215', '40495 Jared Passage North Nicholas, MO 59557', 'USNV Faulkner FPO AE 92056', '0951 Rodriguez Pass New Amanda, VT 89580', 'PSC 4605, Box 3599 APO AA 01276', 'Unit 6421 Box 8090 DPO AA 92020', '33092 Bailey Point Apt. 125 Christineport, CT 39618', '6561 Garcia Greens Suite 234 Thompsonbury, NE 97652', '5088 Patrick Trail Suite 598 West Gabriellaport, AL 34191', '119 Rivera Mill New Megan, MI 94555', '23526 John Lakes Justinview, MI 75568', '93912 Schneider Islands Suite 621 West Danielland, NV 81727', 'Unit 6347 Box 4604 DPO AA 23470', '0537 Parker Neck Frederickchester, LA 97068', '36428 Daniels Key Suite 002 Geraldshire, AL 33466', '7214 Nichols Lights Apt. 553 New Jasonshire, WV 17777', '817 Hansen Forest Suite 241 Miguelfurt, VT 65986', '0830 Morgan Avenue Port Codytown, TX 28801', '28271 Cox Falls Andrewschester, MS 50704', '53860 Danielle Circle Lake Kennethport, WY 58670', '785 Christian Island Barryview, IL 79375', '552 Sarah Plains Suite 766 Lake Carolynchester, SC 32984', '371 Chan Flat South Matthewstad, MT 34729', '24155 Garner Rest Robinsontown, TX 07240', '5514 Richard Circles Suite 350 South Theresa, FL 29770', 'Unit 6999 Box 3429 DPO AE 41048', 'USNV White FPO AE 77674', '85933 Heather Skyway Suite 588 Williamshire, TN 89864', '4861 Mario Springs Mooreberg, CO 24477', '6360 Dale Burgs Apt. 268 Danielburgh, KY 53328', '724 Gregory Camp Suite 114 North Stacey, AZ 73260', '42642 Thompson Place Melissaview, RI 04097', '34983 Michael Drive Apt. 740 New Amy, HI 67004', '123 Daniel Drive Jeffreyton, PA 48454', '742 Molly Dale Suite 778 New Rachelburgh, PA 54172', '989 Mejia Plain Apt. 809 Ochoaview, OR 46152', '096 Katrina Crossroad North Juanborough, WA 62596', '280 Chavez Forest Apt. 210 New Susan, AR 52505', '03999 Anderson Trace Lake Christinehaven, HI 51295', '100 Johnson Center Apt. 955 South Charlesshire, TN 30612', 'USNV Carrillo FPO AE 63280', '2115 Brittney Forks Elizabethbury, NY 10962', '24823 Robinson Coves Mcmahonland, SD 96998', '339 Shawn Crest Jessicaburgh, KS 10629', '395 Yoder Walk Anthonyville, SD 92204', '8407 Robert Common West Alfred, HI 42033', '488 Mike Skyway Suite 426 West Kelseyside, MT 44424', '554 Jacob Fords Maldonadohaven, MD 45933', '7056 Sanders Radial Apt. 700 Zacharyview, NJ 45282', '449 Derrick Isle Apt. 000 West Amberland, NM 02329', '6998 Maria Islands Port Timothyburgh, NC 39483', '2831 Garrett Burg Apt. 769 Lake Jeffrey, AZ 67413', '391 Patel Point Port Elizabethtown, NH 61428'] [floor(random()*100)+1] as address - from - generate_series(1, 20000000) as id - ) - select - *, - no_earlier_than + interval '1 day' as no_later_than - from - base - ); -''' +statement_files = [ + "sql/bringg_setup.sql", + "sql/bringg_tables_ingestion_medium.sql", +] [[queries]] name = "New History Page Main Query - Merchant #1" diff --git a/specs/bringg/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql index 91f90e1..bb838c0 100644 --- a/specs/bringg/sql/bringg_setup.sql +++ b/specs/bringg/sql/bringg_setup.sql @@ -116,7 +116,7 @@ create table customers ( 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 3 shards; +); create table way_points ( id integer, @@ -216,7 +216,7 @@ create table way_points ( 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 3 shards; +); create table tasks ( id integer, @@ -339,4 +339,4 @@ create table tasks ( 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 3 shards; +); From 085cac035953ee94cbdc41bedecf42610b445ae5 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 3 Apr 2025 13:10:51 +0300 Subject: [PATCH 36/44] Shard tables to 6 shards --- specs/bringg/sql/bringg_setup.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/bringg/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql index bb838c0..c0023aa 100644 --- a/specs/bringg/sql/bringg_setup.sql +++ b/specs/bringg/sql/bringg_setup.sql @@ -116,7 +116,7 @@ create table customers ( 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 6 shards; create table way_points ( id integer, @@ -216,7 +216,7 @@ create table way_points ( 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 6 shards; create table tasks ( id integer, @@ -339,4 +339,4 @@ create table tasks ( 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 6 shards; From 6e6e4d49f835fc951c17a5e4649c0309d6741e05 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 3 Apr 2025 13:11:21 +0300 Subject: [PATCH 37/44] Add merchant_id to customers and way_points --- .../sql/bringg_tables_ingestion_small.sql | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/specs/bringg/sql/bringg_tables_ingestion_small.sql b/specs/bringg/sql/bringg_tables_ingestion_small.sql index f606837..76a9580 100644 --- a/specs/bringg/sql/bringg_tables_ingestion_small.sql +++ b/specs/bringg/sql/bringg_tables_ingestion_small.sql @@ -16,10 +16,10 @@ insert into floor(random() * 8) + 1 as status, now() - (floor(random() * 730) * interval '1 day') as ended_time, case - when random() < 0.5 then 1 - when random() < 0.5 then 2 - when random() < 0.5 then 3 - when random() < 0.5 then 4 + when id % 31 >= 15 then 1 + when id % 31 >= 7 then 2 + when id % 31 >= 3 then 3 + when id % 31 >= 1 then 4 else 5 end as merchant_id, floor(random() * 250) + 1 as team_id, @@ -29,9 +29,16 @@ insert into ); insert into - customers (id, name, phone) ( + customers (id, merchant_id, name, phone) ( select id, + case + when id % 31 >= 15 then 1 + when id % 31 >= 7 then 2 + when id % 31 >= 3 then 3 + when id % 31 >= 1 then 4 + else 5 + end as merchant_id, ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone from @@ -41,6 +48,7 @@ insert into insert into way_points ( id, + merchant_id, task_id, customer_id, position, @@ -52,7 +60,14 @@ insert into with base as ( select id, - id / 2 as task_id, + case + when ((id + 1) / 2) % 31 >= 15 then 1 + when ((id + 1) / 2) % 31 >= 7 then 2 + when ((id + 1) / 2) % 31 >= 3 then 3 + when ((id + 1) / 2) % 31 >= 1 then 4 + else 5 + end as merchant_id, + (id + 1) / 2 as task_id, floor(random() * 1000000) + 1 as customer_id, (id % 2) + 1 as position, now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, From 02e07ea1612d4243e3af220195ba5aa4fb29fd7f Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 3 Apr 2025 15:01:42 +0300 Subject: [PATCH 38/44] Add merchant_id to customers and way_points --- .../sql/bringg_tables_ingestion_large.sql | 27 ++++++++++++++----- .../sql/bringg_tables_ingestion_medium.sql | 27 ++++++++++++++----- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/specs/bringg/sql/bringg_tables_ingestion_large.sql b/specs/bringg/sql/bringg_tables_ingestion_large.sql index 433cc9b..fe2a09e 100644 --- a/specs/bringg/sql/bringg_tables_ingestion_large.sql +++ b/specs/bringg/sql/bringg_tables_ingestion_large.sql @@ -16,10 +16,10 @@ insert into floor(random() * 8) + 1 as status, now() - (floor(random() * 730) * interval '1 day') as ended_time, case - when random() < 0.5 then 1 - when random() < 0.5 then 2 - when random() < 0.5 then 3 - when random() < 0.5 then 4 + when id % 31 >= 15 then 1 + when id % 31 >= 7 then 2 + when id % 31 >= 3 then 3 + when id % 31 >= 1 then 4 else 5 end as merchant_id, floor(random() * 250) + 1 as team_id, @@ -29,9 +29,16 @@ insert into ); insert into - customers (id, name, phone) ( + customers (id, merchant_id, name, phone) ( select id, + case + when id % 31 >= 15 then 1 + when id % 31 >= 7 then 2 + when id % 31 >= 3 then 3 + when id % 31 >= 1 then 4 + else 5 + end as merchant_id, ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone from @@ -41,6 +48,7 @@ insert into insert into way_points ( id, + merchant_id, task_id, customer_id, position, @@ -52,7 +60,14 @@ insert into with base as ( select id, - id / 2 as task_id, + case + when ((id + 1) / 2) % 31 >= 15 then 1 + when ((id + 1) / 2) % 31 >= 7 then 2 + when ((id + 1) / 2) % 31 >= 3 then 3 + when ((id + 1) / 2) % 31 >= 1 then 4 + else 5 + end as merchant_id, + (id + 1) / 2 as task_id, floor(random() * 100000000) + 1 as customer_id, (id % 2) + 1 as position, now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, diff --git a/specs/bringg/sql/bringg_tables_ingestion_medium.sql b/specs/bringg/sql/bringg_tables_ingestion_medium.sql index 1f62ccc..9383b90 100644 --- a/specs/bringg/sql/bringg_tables_ingestion_medium.sql +++ b/specs/bringg/sql/bringg_tables_ingestion_medium.sql @@ -16,10 +16,10 @@ insert into floor(random() * 8) + 1 as status, now() - (floor(random() * 730) * interval '1 day') as ended_time, case - when random() < 0.5 then 1 - when random() < 0.5 then 2 - when random() < 0.5 then 3 - when random() < 0.5 then 4 + when id % 31 >= 15 then 1 + when id % 31 >= 7 then 2 + when id % 31 >= 3 then 3 + when id % 31 >= 1 then 4 else 5 end as merchant_id, floor(random() * 250) + 1 as team_id, @@ -29,9 +29,16 @@ insert into ); insert into - customers (id, name, phone) ( + customers (id, merchant_id, name, phone) ( select id, + case + when id % 31 >= 15 then 1 + when id % 31 >= 7 then 2 + when id % 31 >= 3 then 3 + when id % 31 >= 1 then 4 + else 5 + end as merchant_id, ['James Williams', 'Robert Miller', 'James Burns', 'Michael Hoffman', 'Daniel Munoz', 'Katherine Higgins', 'Regina Smith', 'Sharon Baxter', 'Kenneth Sanford', 'Sarah Lewis', 'Gregory Murray', 'Thomas Brown', 'Brandi Jordan', 'James Reyes', 'Dylan Ferguson', 'Shannon Ramos', 'Jasmine Hernandez', 'Janet Booth', 'Melissa Williams', 'Terri Schaefer', 'Dawn Carson', 'Bonnie Carter', 'Deanna Galvan', 'Mary Santos', 'Jeremy Bowers', 'Jackie Collins', 'Yesenia Webb', 'Erik Rodriguez', 'Jeremy Carey', 'Raymond Robles', 'Catherine Francis', 'Richard Sellers', 'Michelle Harrell', 'Mary Hodge', 'Lisa Gibbs', 'Kathryn Vang', 'Dana Valentine', 'Nathan Gordon', 'Thomas Roberts', 'Elizabeth Schultz', 'Patricia Ross', 'Jessica Jones', 'Debbie Johnson', 'Nicole Johnson', 'Emily Buckley', 'Joanna Mcdaniel', 'Mark Johnson', 'Angela Gonzalez', 'Elizabeth Garza', 'Linda Smith', 'Lucas Hill', 'Ashley Daugherty', 'Linda Harris', 'John Allen', 'Craig Rollins', 'Jamie Carey', 'Diana Lopez', 'Kevin Mccullough', 'Randy Tran Jr.', 'Leslie Martinez', 'Anthony Villa', 'Kathryn Hale', 'Virginia Snyder', 'Mr. Theodore Marshall MD', 'Gregory Burgess', 'Linda Brown', 'Kathryn Blevins', 'Ryan Jenkins', 'Rhonda Hendricks', 'Elizabeth Clay', 'Robert Casey', 'Gregory Gallegos', 'Sarah Rogers', 'Jacob Steele', 'Paul Stone', 'Stacy Hancock', 'Richard Simon', 'Cassandra Hurley', 'Matthew Peck', 'Sherry Lester', 'Julie Lutz', 'Thomas Tyler', 'Stefanie Richard', 'Jared Duffy', 'Ryan Morgan', 'Craig Lee', 'Shane Goodman', 'John Parrish', 'Daniel Tate', 'Benjamin Garza', 'Amanda Long', 'David Williams', 'Jason Payne', 'Dawn Baker', 'Sean Carpenter', 'Kyle Ramos', 'Stephen Armstrong', 'Matthew Molina', 'Teresa Maldonado', 'Michael Wilkins'] [floor(random()*100)+1] as name, ['+12953505448', '+11905184951', '+18042482553', '+19149712387', '+16166764600', '+12027300554', '+11892633628', '+15323557247', '+15222090502', '+12671277239', '+11090721920', '+12105528972', '+19384841641', '+16949792753', '+14289338017', '+10471796332', '+19842432729', '+16461975114', '+14675808007', '+19281911777', '+10187697937', '+18817774023', '+15502769171', '+13495401787', '+14094596521', '+15003539128', '+10356253565', '+14423173913', '+13475220390', '+19611170654', '+15854712143', '+13992167054', '+18841791460', '+14356578039', '+17914937496', '+17913249959', '+10850334373', '+10865044441', '+13182258438', '+18351572820', '+16315540550', '+15481506772', '+16150430101', '+12125861062', '+14129306347', '+14502216620', '+11243948618', '+19452492642', '+15815673870', '+19383545060', '+15229589429', '+13515441283', '+13882762938', '+15532711512', '+16737470762', '+12521340743', '+11344906687', '+12168712139', '+12721549323', '+18574651737', '+19882643813', '+17747628798', '+10890134811', '+10644500922', '+19959000741', '+18117951197', '+16090813528', '+19105142194', '+13370419762', '+17647863830', '+10318820001', '+15481786973', '+18944202879', '+16793723407', '+11856803011', '+10363713361', '+14132540969', '+17489239825', '+14595961929', '+13308668108', '+17858400641', '+11664038925', '+15692672292', '+18873148203', '+11450323169', '+13493952598', '+12600579317', '+17147834562', '+14059076825', '+10162330254', '+15291908735', '+15108977285', '+15118464508', '+15901987932', '+11770023652', '+18058870336', '+14964678876', '+18544892084', '+15257910603', '+13334618420'] [floor(random()*100)+1] as phone from @@ -41,6 +48,7 @@ insert into insert into way_points ( id, + merchant_id, task_id, customer_id, position, @@ -52,7 +60,14 @@ insert into with base as ( select id, - id / 2 as task_id, + case + when ((id + 1) / 2) % 31 >= 15 then 1 + when ((id + 1) / 2) % 31 >= 7 then 2 + when ((id + 1) / 2) % 31 >= 3 then 3 + when ((id + 1) / 2) % 31 >= 1 then 4 + else 5 + end as merchant_id, + (id + 1) / 2 as task_id, floor(random() * 10000000) + 1 as customer_id, (id % 2) + 1 as position, now() - (floor(random() * 730 * 24) * interval '1 hours') as no_earlier_than, From eed8d8b5d8b491ae0e929b9139f92044191d092e Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 3 Apr 2025 16:17:07 +0300 Subject: [PATCH 39/44] Add merchant_id filter to large test spec and reduce iterations count to 20 --- specs/bringg/bringg_large.toml | 358 ++++++++++++++++++++++----------- 1 file changed, 239 insertions(+), 119 deletions(-) diff --git a/specs/bringg/bringg_large.toml b/specs/bringg/bringg_large.toml index c1749cd..50050b1 100644 --- a/specs/bringg/bringg_large.toml +++ b/specs/bringg/bringg_large.toml @@ -18,7 +18,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -35,7 +35,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -52,7 +52,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -69,7 +69,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -86,7 +86,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -101,7 +101,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 1 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -116,7 +116,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 2 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -131,7 +131,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 3 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -146,7 +146,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 4 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -161,7 +161,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 5 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -179,7 +179,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -197,7 +197,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -215,7 +215,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -233,7 +233,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -251,7 +251,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -267,7 +267,7 @@ statement = ''' and merchant_id = 1 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -283,7 +283,7 @@ statement = ''' and merchant_id = 2 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -299,7 +299,7 @@ statement = ''' and merchant_id = 3 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -315,7 +315,7 @@ statement = ''' and merchant_id = 4 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 @@ -332,7 +332,7 @@ statement = ''' and merchant_id = 5 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -350,7 +350,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -368,7 +368,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -386,7 +386,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -404,7 +404,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -422,7 +422,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -438,7 +438,7 @@ statement = ''' and merchant_id = 1 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -454,7 +454,7 @@ statement = ''' and merchant_id = 2 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -470,7 +470,7 @@ statement = ''' and merchant_id = 3 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -486,7 +486,7 @@ statement = ''' and merchant_id = 4 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 @@ -503,7 +503,7 @@ statement = ''' and merchant_id = 5 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -519,12 +519,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -540,12 +542,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -561,12 +565,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -582,12 +588,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -603,12 +611,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -624,10 +634,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -643,10 +655,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -662,10 +676,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -681,10 +697,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -700,10 +718,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and position = 1 and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -719,11 +739,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -739,11 +761,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -759,11 +783,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -779,11 +805,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -799,11 +827,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -819,9 +849,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -837,9 +869,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -855,9 +889,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -873,9 +909,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -891,9 +929,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -908,12 +948,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -928,12 +969,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -948,12 +990,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -968,12 +1011,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -988,12 +1032,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1008,10 +1053,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1026,10 +1072,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1044,10 +1091,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1062,10 +1110,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1080,10 +1129,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1104,7 +1154,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1125,7 +1175,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1146,7 +1196,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1167,7 +1217,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1188,7 +1238,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1207,7 +1257,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1226,7 +1276,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1245,7 +1295,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1264,7 +1314,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1283,7 +1333,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1299,17 +1349,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp1.merchant_id = 1 + and wp2.merchant_id = 1 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #2" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #2" statement = ''' select distinct t.id @@ -1321,17 +1373,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp1.merchant_id = 2 + and wp2.merchant_id = 2 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #3" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #3" statement = ''' select distinct t.id @@ -1343,17 +1397,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp1.merchant_id = 3 + and wp2.merchant_id = 3 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #4" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #4" statement = ''' select distinct t.id @@ -1365,17 +1421,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp1.merchant_id = 4 + and wp2.merchant_id = 4 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #5" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #5" statement = ''' select distinct t.id @@ -1387,17 +1445,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp1.merchant_id = 5 + and wp2.merchant_id = 5 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #1" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" statement = ''' select count(distinct t.id) @@ -1409,15 +1469,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp1.merchant_id = 1 + and wp2.merchant_id = 1 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #2" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #2" statement = ''' select count(distinct t.id) @@ -1429,15 +1491,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp1.merchant_id = 2 + and wp2.merchant_id = 2 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #3" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #3" statement = ''' select count(distinct t.id) @@ -1449,15 +1513,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp1.merchant_id = 3 + and wp2.merchant_id = 3 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #4" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #4" statement = ''' select count(distinct t.id) @@ -1469,15 +1535,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp1.merchant_id = 4 + and wp2.merchant_id = 4 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #5" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #5" statement = ''' select count(distinct t.id) @@ -1489,11 +1557,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp1.merchant_id = 5 + and wp2.merchant_id = 5 and t.task_type_id=6 AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1509,13 +1579,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1531,13 +1603,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1553,13 +1627,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1575,13 +1651,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1597,13 +1675,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1619,11 +1699,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1639,11 +1721,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1659,11 +1743,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1679,11 +1765,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1699,11 +1787,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1719,6 +1809,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1729,7 +1821,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1745,6 +1837,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1755,7 +1849,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1771,6 +1865,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1781,7 +1877,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1797,6 +1893,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1807,7 +1905,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1823,6 +1921,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1833,7 +1933,7 @@ statement = ''' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1849,6 +1949,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1857,7 +1959,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1873,6 +1975,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1881,7 +1985,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1897,6 +2001,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1905,7 +2011,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1921,6 +2027,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1929,7 +2037,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1945,6 +2053,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' @@ -1953,7 +2063,7 @@ statement = ''' or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1969,10 +2079,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1988,10 +2100,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2007,10 +2121,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2026,10 +2142,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2045,10 +2163,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2065,7 +2185,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2082,7 +2202,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2099,7 +2219,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2116,7 +2236,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2133,7 +2253,7 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 ''' -iterations = 50 +iterations = 20 concurrency = 2 [teardown] From d25f5e17ebd45237fc2919b919ba193c9c2a437a Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 3 Apr 2025 16:26:30 +0300 Subject: [PATCH 40/44] comment out very long running queries from large spec --- specs/bringg/bringg_large.toml | 1356 ++++++++++++++++---------------- 1 file changed, 678 insertions(+), 678 deletions(-) diff --git a/specs/bringg/bringg_large.toml b/specs/bringg/bringg_large.toml index 50050b1..d7aa2c3 100644 --- a/specs/bringg/bringg_large.toml +++ b/specs/bringg/bringg_large.toml @@ -506,435 +506,435 @@ statement = ''' iterations = 20 concurrency = 2 -[[queries]] -name = "New History Page Main Query - First WP Customer Name - Merchant #1" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 1 - and wp.merchant_id = 1 - and c.merchant_id = 1 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - First WP Customer Name - Merchant #2" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 2 - and wp.merchant_id = 2 - and c.merchant_id = 2 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - First WP Customer Name - Merchant #3" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 3 - and wp.merchant_id = 3 - and c.merchant_id = 3 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - First WP Customer Name - Merchant #4" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 4 - and wp.merchant_id = 4 - and c.merchant_id = 4 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - First WP Customer Name - Merchant #5" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 5 - and wp.merchant_id = 5 - and c.merchant_id = 5 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - First WP Customer Name - Merchant #1" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 1 - and wp.merchant_id = 1 - and c.merchant_id = 1 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - First WP Customer Name - Merchant #2" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 2 - and wp.merchant_id = 2 - and c.merchant_id = 2 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - First WP Customer Name - Merchant #3" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 3 - and wp.merchant_id = 3 - and c.merchant_id = 3 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - First WP Customer Name - Merchant #4" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 4 - and wp.merchant_id = 4 - and c.merchant_id = 4 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - First WP Customer Name - Merchant #5" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 5 - and wp.merchant_id = 5 - and c.merchant_id = 5 - and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Customer Phone - Merchant #1" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 1 - and wp.merchant_id = 1 - and c.merchant_id = 1 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Customer Phone - Merchant #2" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 2 - and wp.merchant_id = 2 - and c.merchant_id = 2 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Customer Phone - Merchant #3" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 3 - and wp.merchant_id = 3 - and c.merchant_id = 3 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Customer Phone - Merchant #4" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 4 - and wp.merchant_id = 4 - and c.merchant_id = 4 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Customer Phone - Merchant #5" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 5 - and wp.merchant_id = 5 - and c.merchant_id = 5 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') - limit - 26; -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Customer Phone - Merchant #1" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 1 - and wp.merchant_id = 1 - and c.merchant_id = 1 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Customer Phone - Merchant #2" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 2 - and wp.merchant_id = 2 - and c.merchant_id = 2 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Customer Phone - Merchant #3" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 3 - and wp.merchant_id = 3 - and c.merchant_id = 3 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Customer Phone - Merchant #4" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 4 - and wp.merchant_id = 4 - and c.merchant_id = 4 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Customer Phone - Merchant #5" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 5 - and wp.merchant_id = 5 - and c.merchant_id = 5 - and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); -''' -iterations = 20 -concurrency = 2 +# [[queries]] +# name = "New History Page Main Query - First WP Customer Name - Merchant #1" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 1 +# and wp.merchant_id = 1 +# and c.merchant_id = 1 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - First WP Customer Name - Merchant #2" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 2 +# and wp.merchant_id = 2 +# and c.merchant_id = 2 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - First WP Customer Name - Merchant #3" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 3 +# and wp.merchant_id = 3 +# and c.merchant_id = 3 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - First WP Customer Name - Merchant #4" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 4 +# and wp.merchant_id = 4 +# and c.merchant_id = 4 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - First WP Customer Name - Merchant #5" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 5 +# and wp.merchant_id = 5 +# and c.merchant_id = 5 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - First WP Customer Name - Merchant #1" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 1 +# and wp.merchant_id = 1 +# and c.merchant_id = 1 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - First WP Customer Name - Merchant #2" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 2 +# and wp.merchant_id = 2 +# and c.merchant_id = 2 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - First WP Customer Name - Merchant #3" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 3 +# and wp.merchant_id = 3 +# and c.merchant_id = 3 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - First WP Customer Name - Merchant #4" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 4 +# and wp.merchant_id = 4 +# and c.merchant_id = 4 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - First WP Customer Name - Merchant #5" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 5 +# and wp.merchant_id = 5 +# and c.merchant_id = 5 +# and position = 1 +# and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Customer Phone - Merchant #1" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 1 +# and wp.merchant_id = 1 +# and c.merchant_id = 1 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Customer Phone - Merchant #2" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 2 +# and wp.merchant_id = 2 +# and c.merchant_id = 2 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Customer Phone - Merchant #3" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 3 +# and wp.merchant_id = 3 +# and c.merchant_id = 3 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Customer Phone - Merchant #4" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 4 +# and wp.merchant_id = 4 +# and c.merchant_id = 4 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Customer Phone - Merchant #5" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 5 +# and wp.merchant_id = 5 +# and c.merchant_id = 5 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') +# limit +# 26; +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Customer Phone - Merchant #1" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 1 +# and wp.merchant_id = 1 +# and c.merchant_id = 1 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Customer Phone - Merchant #2" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 2 +# and wp.merchant_id = 2 +# and c.merchant_id = 2 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Customer Phone - Merchant #3" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 3 +# and wp.merchant_id = 3 +# and c.merchant_id = 3 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Customer Phone - Merchant #4" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 4 +# and wp.merchant_id = 4 +# and c.merchant_id = 4 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Customer Phone - Merchant #5" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 5 +# and wp.merchant_id = 5 +# and c.merchant_id = 5 +# and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); +# ''' +# iterations = 20 +# concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #1" @@ -1148,8 +1148,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1169,8 +1169,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1190,8 +1190,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1211,8 +1211,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1232,8 +1232,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1253,8 +1253,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -1272,8 +1272,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -1291,8 +1291,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -1310,8 +1310,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -1329,8 +1329,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -1352,8 +1352,8 @@ statement = ''' and wp1.merchant_id = 1 and wp2.merchant_id = 1 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' @@ -1376,8 +1376,8 @@ statement = ''' and wp1.merchant_id = 2 and wp2.merchant_id = 2 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' @@ -1400,8 +1400,8 @@ statement = ''' and wp1.merchant_id = 3 and wp2.merchant_id = 3 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' @@ -1424,8 +1424,8 @@ statement = ''' and wp1.merchant_id = 4 and wp2.merchant_id = 4 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' @@ -1448,8 +1448,8 @@ statement = ''' and wp1.merchant_id = 5 and wp2.merchant_id = 5 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' @@ -1472,8 +1472,8 @@ statement = ''' and wp1.merchant_id = 1 and wp2.merchant_id = 1 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' iterations = 20 concurrency = 2 @@ -1494,8 +1494,8 @@ statement = ''' and wp1.merchant_id = 2 and wp2.merchant_id = 2 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' iterations = 20 concurrency = 2 @@ -1516,8 +1516,8 @@ statement = ''' and wp1.merchant_id = 3 and wp2.merchant_id = 3 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' iterations = 20 concurrency = 2 @@ -1538,8 +1538,8 @@ statement = ''' and wp1.merchant_id = 4 and wp2.merchant_id = 4 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' iterations = 20 concurrency = 2 @@ -1560,8 +1560,8 @@ statement = ''' and wp1.merchant_id = 5 and wp2.merchant_id = 5 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' iterations = 20 concurrency = 2 @@ -1815,8 +1815,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1843,8 +1843,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1871,8 +1871,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1899,8 +1899,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1927,8 +1927,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; @@ -1955,8 +1955,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -1981,8 +1981,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -2007,8 +2007,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -2033,8 +2033,8 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 @@ -2059,202 +2059,202 @@ statement = ''' and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' iterations = 20 concurrency = 2 -[[queries]] -name = "New History Page Main Query - Unnecessary Joins - Merchant #1" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 1 - and wp.merchant_id = 1 - and c.merchant_id = 1 - limit - 26 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Unnecessary Joins - Merchant #2" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 2 - and wp.merchant_id = 2 - and c.merchant_id = 2 - limit - 26 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Unnecessary Joins - Merchant #3" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 3 - and wp.merchant_id = 3 - and c.merchant_id = 3 - limit - 26 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Unnecessary Joins - Merchant #4" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 4 - and wp.merchant_id = 4 - and c.merchant_id = 4 - limit - 26 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Main Query - Unnecessary Joins - Merchant #5" -statement = ''' - select - distinct t.id - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 5 - and wp.merchant_id = 5 - and c.merchant_id = 5 - limit - 26 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Merchant #1" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 1 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Merchant #2" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 2 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Merchant #3" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 3 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Merchant #4" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 4 -''' -iterations = 20 -concurrency = 2 - -[[queries]] -name = "New History Page Count Query - Merchant #5" -statement = ''' - select - count(distinct t.id) - from - tasks t - join way_points wp on wp.task_id = t.id - join customers c on c.id = wp.customer_id - where - status IN (4,7) - and ended_time > now() - interval '45 days' - and t.merchant_id = 5 -''' -iterations = 20 -concurrency = 2 +# [[queries]] +# name = "New History Page Main Query - Unnecessary Joins - Merchant #1" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 1 +# and wp.merchant_id = 1 +# and c.merchant_id = 1 +# limit +# 26 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Unnecessary Joins - Merchant #2" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 2 +# and wp.merchant_id = 2 +# and c.merchant_id = 2 +# limit +# 26 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Unnecessary Joins - Merchant #3" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 3 +# and wp.merchant_id = 3 +# and c.merchant_id = 3 +# limit +# 26 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Unnecessary Joins - Merchant #4" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 4 +# and wp.merchant_id = 4 +# and c.merchant_id = 4 +# limit +# 26 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Main Query - Unnecessary Joins - Merchant #5" +# statement = ''' +# select +# distinct t.id +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 5 +# and wp.merchant_id = 5 +# and c.merchant_id = 5 +# limit +# 26 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Unnecessary Joins - Merchant #1" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 1 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Unnecessary Joins - Merchant #2" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 2 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Unnecessary Joins - Merchant #3" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 3 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Unnecessary Joins - Merchant #4" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 4 +# ''' +# iterations = 20 +# concurrency = 2 + +# [[queries]] +# name = "New History Page Count Query - Unnecessary Joins - Merchant #5" +# statement = ''' +# select +# count(distinct t.id) +# from +# tasks t +# join way_points wp on wp.task_id = t.id +# join customers c on c.id = wp.customer_id +# where +# status IN (4,7) +# and ended_time > now() - interval '45 days' +# and t.merchant_id = 5 +# ''' +# iterations = 20 +# concurrency = 2 [teardown] statement_files = ["sql/bringg_teardown.sql"] From c469eeff4b0d59695a464f55d3d9aa81ece7b5b6 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 3 Apr 2025 16:55:15 +0300 Subject: [PATCH 41/44] Add merchant_id filter to medium test spec and reduce iterations count to 20 --- specs/bringg/bringg_medium.toml | 728 +++++++++++++++++++------------- 1 file changed, 424 insertions(+), 304 deletions(-) diff --git a/specs/bringg/bringg_medium.toml b/specs/bringg/bringg_medium.toml index 0a97527..5855438 100644 --- a/specs/bringg/bringg_medium.toml +++ b/specs/bringg/bringg_medium.toml @@ -18,8 +18,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #2" @@ -35,8 +35,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #3" @@ -52,8 +52,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #4" @@ -69,8 +69,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Merchant #5" @@ -86,8 +86,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #1" @@ -101,8 +101,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 1 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #2" @@ -116,8 +116,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 2 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #3" @@ -131,8 +131,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 3 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #4" @@ -146,8 +146,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 4 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Merchant #5" @@ -161,8 +161,8 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 5 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #1" @@ -179,8 +179,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #2" @@ -197,8 +197,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #3" @@ -215,8 +215,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #4" @@ -233,8 +233,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Single Team - Merchant #5" @@ -251,8 +251,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #1" @@ -267,8 +267,8 @@ statement = ''' and merchant_id = 1 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #2" @@ -283,8 +283,8 @@ statement = ''' and merchant_id = 2 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #3" @@ -299,8 +299,8 @@ statement = ''' and merchant_id = 3 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Single Team - Merchant #4" @@ -315,8 +315,8 @@ statement = ''' and merchant_id = 4 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] @@ -332,8 +332,8 @@ statement = ''' and merchant_id = 5 and team_id = 6 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #1" @@ -350,8 +350,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #2" @@ -368,8 +368,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #3" @@ -386,8 +386,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #4" @@ -404,8 +404,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Many Teams - Merchant #5" @@ -422,8 +422,8 @@ statement = ''' limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #1" @@ -438,8 +438,8 @@ statement = ''' and merchant_id = 1 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #2" @@ -454,8 +454,8 @@ statement = ''' and merchant_id = 2 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #3" @@ -470,8 +470,8 @@ statement = ''' and merchant_id = 3 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Many Teams - Merchant #4" @@ -486,8 +486,8 @@ statement = ''' and merchant_id = 4 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] @@ -503,8 +503,8 @@ statement = ''' and merchant_id = 5 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #1" @@ -519,13 +519,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #2" @@ -540,13 +542,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #3" @@ -561,13 +565,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #4" @@ -582,13 +588,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - First WP Customer Name - Merchant #5" @@ -603,13 +611,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #1" @@ -624,11 +634,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #2" @@ -643,11 +655,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #3" @@ -662,11 +676,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #4" @@ -681,11 +697,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - First WP Customer Name - Merchant #5" @@ -700,11 +718,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #1" @@ -719,12 +739,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #2" @@ -739,12 +761,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #3" @@ -759,12 +783,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #4" @@ -779,12 +805,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone - Merchant #5" @@ -799,12 +827,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #1" @@ -819,10 +849,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #2" @@ -837,10 +869,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #3" @@ -855,10 +889,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #4" @@ -873,10 +909,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone - Merchant #5" @@ -891,10 +929,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #1" @@ -908,13 +948,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #2" @@ -928,13 +969,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #3" @@ -948,13 +990,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #4" @@ -968,13 +1011,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - WP Time Frame - Merchant #5" @@ -988,13 +1032,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #1" @@ -1008,11 +1053,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #2" @@ -1026,11 +1072,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #3" @@ -1044,11 +1091,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #4" @@ -1062,11 +1110,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - WP Time Frame - Merchant #5" @@ -1080,11 +1129,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #1" @@ -1098,14 +1148,14 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #2" @@ -1119,14 +1169,14 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #3" @@ -1140,14 +1190,14 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #4" @@ -1161,14 +1211,14 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Title/External ID - Merchant #5" @@ -1182,14 +1232,14 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #1" @@ -1203,12 +1253,12 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #2" @@ -1222,12 +1272,12 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #3" @@ -1241,12 +1291,12 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #4" @@ -1260,12 +1310,12 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Task Title/External ID - Merchant #5" @@ -1279,12 +1329,12 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" @@ -1299,17 +1349,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp1.merchant_id = 1 + and wp2.merchant_id = 1 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #2" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #2" statement = ''' select distinct t.id @@ -1321,17 +1373,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp1.merchant_id = 2 + and wp2.merchant_id = 2 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #3" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #3" statement = ''' select distinct t.id @@ -1343,17 +1397,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp1.merchant_id = 3 + and wp2.merchant_id = 3 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #4" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #4" statement = ''' select distinct t.id @@ -1365,17 +1421,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp1.merchant_id = 4 + and wp2.merchant_id = 4 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #5" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #5" statement = ''' select distinct t.id @@ -1387,17 +1445,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp1.merchant_id = 5 + and wp2.merchant_id = 5 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #1" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" statement = ''' select count(distinct t.id) @@ -1409,15 +1469,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp1.merchant_id = 1 + and wp2.merchant_id = 1 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #2" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #2" statement = ''' select count(distinct t.id) @@ -1429,15 +1491,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp1.merchant_id = 2 + and wp2.merchant_id = 2 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #3" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #3" statement = ''' select count(distinct t.id) @@ -1449,15 +1513,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp1.merchant_id = 3 + and wp2.merchant_id = 3 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #4" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #4" statement = ''' select count(distinct t.id) @@ -1469,15 +1535,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp1.merchant_id = 4 + and wp2.merchant_id = 4 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #5" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #5" statement = ''' select count(distinct t.id) @@ -1489,12 +1557,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp1.merchant_id = 5 + and wp2.merchant_id = 5 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #1" @@ -1509,14 +1579,16 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #2" @@ -1531,14 +1603,16 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #3" @@ -1553,14 +1627,16 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #4" @@ -1575,14 +1651,16 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame - Merchant #5" @@ -1597,14 +1675,16 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #1" @@ -1619,12 +1699,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #2" @@ -1639,12 +1721,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #3" @@ -1659,12 +1743,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #4" @@ -1679,12 +1765,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame - Merchant #5" @@ -1699,12 +1787,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" @@ -1719,18 +1809,20 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" @@ -1745,18 +1837,20 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" @@ -1771,18 +1865,20 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" @@ -1797,18 +1893,20 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" @@ -1823,18 +1921,20 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #1" @@ -1849,16 +1949,18 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #2" @@ -1873,16 +1975,18 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #3" @@ -1897,16 +2001,18 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #4" @@ -1921,16 +2027,18 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Count Query - Customer Phone and WP Time Frame and Task Title/External ID - Merchant #5" @@ -1945,16 +2053,18 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #1" @@ -1969,11 +2079,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #2" @@ -1988,11 +2100,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #3" @@ -2007,11 +2121,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #4" @@ -2026,11 +2142,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] name = "New History Page Main Query - Unnecessary Joins - Merchant #5" @@ -2045,14 +2163,16 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 limit 26 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #1" +name = "New History Page Count Query - Unnecessary Joins - Merchant #1" statement = ''' select count(distinct t.id) @@ -2065,11 +2185,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #2" +name = "New History Page Count Query - Unnecessary Joins - Merchant #2" statement = ''' select count(distinct t.id) @@ -2082,11 +2202,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #3" +name = "New History Page Count Query - Unnecessary Joins - Merchant #3" statement = ''' select count(distinct t.id) @@ -2099,11 +2219,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #4" +name = "New History Page Count Query - Unnecessary Joins - Merchant #4" statement = ''' select count(distinct t.id) @@ -2116,11 +2236,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #5" +name = "New History Page Count Query - Unnecessary Joins - Merchant #5" statement = ''' select count(distinct t.id) @@ -2133,8 +2253,8 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 ''' -iterations = 1000 -concurrency = 10 +iterations = 20 +concurrency = 2 [teardown] statement_files = ["sql/bringg_teardown.sql"] From 78c01ce508ad42c64993b0063d8d0f8c763cac70 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 3 Apr 2025 17:19:47 +0300 Subject: [PATCH 42/44] Add missing merchant_id filters --- specs/bringg/bringg_large.toml | 10 ++++++++++ specs/bringg/bringg_medium.toml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/specs/bringg/bringg_large.toml b/specs/bringg/bringg_large.toml index d7aa2c3..e648695 100644 --- a/specs/bringg/bringg_large.toml +++ b/specs/bringg/bringg_large.toml @@ -2184,6 +2184,8 @@ concurrency = 2 # status IN (4,7) # and ended_time > now() - interval '45 days' # and t.merchant_id = 1 +# and wp.merchant_id = 1 +# and c.merchant_id = 1 # ''' # iterations = 20 # concurrency = 2 @@ -2201,6 +2203,8 @@ concurrency = 2 # status IN (4,7) # and ended_time > now() - interval '45 days' # and t.merchant_id = 2 +# and wp.merchant_id = 2 +# and c.merchant_id = 2 # ''' # iterations = 20 # concurrency = 2 @@ -2218,6 +2222,8 @@ concurrency = 2 # status IN (4,7) # and ended_time > now() - interval '45 days' # and t.merchant_id = 3 +# and wp.merchant_id = 3 +# and c.merchant_id = 3 # ''' # iterations = 20 # concurrency = 2 @@ -2235,6 +2241,8 @@ concurrency = 2 # status IN (4,7) # and ended_time > now() - interval '45 days' # and t.merchant_id = 4 +# and wp.merchant_id = 4 +# and c.merchant_id = 4 # ''' # iterations = 20 # concurrency = 2 @@ -2252,6 +2260,8 @@ concurrency = 2 # status IN (4,7) # and ended_time > now() - interval '45 days' # and t.merchant_id = 5 +# and wp.merchant_id = 5 +# and c.merchant_id = 5 # ''' # iterations = 20 # concurrency = 2 diff --git a/specs/bringg/bringg_medium.toml b/specs/bringg/bringg_medium.toml index 5855438..f7a3d38 100644 --- a/specs/bringg/bringg_medium.toml +++ b/specs/bringg/bringg_medium.toml @@ -2184,6 +2184,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 ''' iterations = 20 concurrency = 2 @@ -2201,6 +2203,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 ''' iterations = 20 concurrency = 2 @@ -2218,6 +2222,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 ''' iterations = 20 concurrency = 2 @@ -2235,6 +2241,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 ''' iterations = 20 concurrency = 2 @@ -2252,6 +2260,8 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 ''' iterations = 20 concurrency = 2 From 3c70f0d6bee210bf73362ca9ba7c8792f8132499 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Thu, 3 Apr 2025 17:20:01 +0300 Subject: [PATCH 43/44] Add merchant_id filter to small test spec and reduce iterations count to 20 --- specs/bringg/bringg_small.toml | 523 +++++++++++++++++++++------------ 1 file changed, 328 insertions(+), 195 deletions(-) diff --git a/specs/bringg/bringg_small.toml b/specs/bringg/bringg_small.toml index da57faa..f58fedc 100644 --- a/specs/bringg/bringg_small.toml +++ b/specs/bringg/bringg_small.toml @@ -1,5 +1,8 @@ [setup] -statement_files = ["sql/bringg_setup.sql", "sql/bringg_tables_ingestion_small.sql"] +statement_files = [ + "sql/bringg_setup.sql", + "sql/bringg_tables_ingestion_small.sql", +] [[queries]] name = "New History Page Main Query - Merchant #1" @@ -15,7 +18,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -32,7 +35,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -49,7 +52,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -66,7 +69,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -83,7 +86,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -98,7 +101,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 1 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -113,7 +116,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 2 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -128,7 +131,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 3 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -143,7 +146,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 4 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -158,7 +161,7 @@ statement = ''' and ended_time > now() - interval '45 days' and merchant_id = 5 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -176,7 +179,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -194,7 +197,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -212,7 +215,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -230,7 +233,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -248,7 +251,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -264,7 +267,7 @@ statement = ''' and merchant_id = 1 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -280,7 +283,7 @@ statement = ''' and merchant_id = 2 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -296,7 +299,7 @@ statement = ''' and merchant_id = 3 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -312,7 +315,7 @@ statement = ''' and merchant_id = 4 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 @@ -329,7 +332,7 @@ statement = ''' and merchant_id = 5 and team_id = 6 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -347,7 +350,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -365,7 +368,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -383,7 +386,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -401,7 +404,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -419,7 +422,7 @@ statement = ''' limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -435,7 +438,7 @@ statement = ''' and merchant_id = 1 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -451,7 +454,7 @@ statement = ''' and merchant_id = 2 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -467,7 +470,7 @@ statement = ''' and merchant_id = 3 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -483,7 +486,7 @@ statement = ''' and merchant_id = 4 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 @@ -500,7 +503,7 @@ statement = ''' and merchant_id = 5 and team_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -516,12 +519,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -537,12 +542,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -558,12 +565,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -579,12 +588,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -600,12 +611,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer') + and match(c.name_ngram, 'Ste') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -621,10 +634,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -640,10 +655,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -659,10 +676,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -678,10 +697,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -697,10 +718,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and position = 1 - and match(c.name_ngram, 'Ste') using phrase with (analyzer='full_search_analyzer'); + and match(c.name_ngram, 'Ste') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -716,11 +739,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -736,11 +761,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -756,11 +783,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -776,11 +805,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -796,11 +827,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -816,9 +849,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -834,9 +869,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -852,9 +889,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -870,9 +909,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -888,9 +929,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -905,12 +948,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -925,12 +969,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -945,12 +990,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -965,12 +1011,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -985,12 +1032,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1005,10 +1053,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1023,10 +1072,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1041,10 +1091,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1059,10 +1110,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1077,10 +1129,11 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1095,13 +1148,13 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1116,13 +1169,13 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1137,13 +1190,13 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1158,13 +1211,13 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1179,13 +1232,13 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1200,11 +1253,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 1 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1219,11 +1272,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 2 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1238,11 +1291,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 3 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1257,11 +1310,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 4 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1276,11 +1329,11 @@ statement = ''' and ended_time > now() - interval '45 days' and t.merchant_id = 5 and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1296,17 +1349,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp1.merchant_id = 1 + and wp2.merchant_id = 1 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #2" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #2" statement = ''' select distinct t.id @@ -1318,17 +1373,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp1.merchant_id = 2 + and wp2.merchant_id = 2 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #3" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #3" statement = ''' select distinct t.id @@ -1340,17 +1397,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp1.merchant_id = 3 + and wp2.merchant_id = 3 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #4" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #4" statement = ''' select distinct t.id @@ -1362,17 +1421,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp1.merchant_id = 4 + and wp2.merchant_id = 4 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Main Query - Task Title/External ID - Merchant #5" +name = "New History Page Main Query - Task Type ID and WP1 City and WP2 Address - Merchant #5" statement = ''' select distinct t.id @@ -1384,17 +1445,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp1.merchant_id = 5 + and wp2.merchant_id = 5 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer') + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and') limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #1" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #1" statement = ''' select count(distinct t.id) @@ -1406,15 +1469,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp1.merchant_id = 1 + and wp2.merchant_id = 1 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #2" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #2" statement = ''' select count(distinct t.id) @@ -1426,15 +1491,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp1.merchant_id = 2 + and wp2.merchant_id = 2 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #3" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #3" statement = ''' select count(distinct t.id) @@ -1446,15 +1513,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp1.merchant_id = 3 + and wp2.merchant_id = 3 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #4" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #4" statement = ''' select count(distinct t.id) @@ -1466,15 +1535,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp1.merchant_id = 4 + and wp2.merchant_id = 4 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Task Title/External ID - Merchant #5" +name = "New History Page Count Query - Task Type ID and WP1 City and WP2 Address - Merchant #5" statement = ''' select count(distinct t.id) @@ -1486,11 +1557,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp1.merchant_id = 5 + and wp2.merchant_id = 5 and t.task_type_id=6 - AND match(wp1.city_ngram, 'New') using phrase with (analyzer='full_search_analyzer') - AND MATCH(wp2.address_ngram, 'South') using phrase with (analyzer='full_search_analyzer'); + AND match(wp1.city_ngram, 'New') using best_fields with (operator='and') + AND MATCH(wp2.address_ngram, 'South') using best_fields with (operator='and'); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1506,13 +1579,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1528,13 +1603,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1550,13 +1627,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1572,13 +1651,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1594,13 +1675,15 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1616,11 +1699,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1636,11 +1721,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1656,11 +1743,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1676,11 +1765,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1696,11 +1787,13 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours'; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1716,17 +1809,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1742,17 +1837,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1768,17 +1865,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1794,17 +1893,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1820,17 +1921,19 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ) limit 26; ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1846,15 +1949,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1870,15 +1975,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1894,15 +2001,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1918,15 +2027,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1942,15 +2053,17 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 and match(c.phone_ngram, '12027') using phrase with (analyzer='standard') and wp.no_earlier_than <= now() - interval '30 hours' and wp.no_later_than >= now() - interval '28 hours' and ( - match(t.title_ngram, 'ber') using phrase with (analyzer='full_search_analyzer') - or match(t.external_id_ngram, 'ber') using phrase with (analyzer='full_search_ngram_analyzer') + match(t.title_ngram, 'ber') using best_fields with (operator='and') + or match(t.external_id_ngram, 'ber') using best_fields with (operator='and') ); ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1966,10 +2079,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -1985,10 +2100,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2004,10 +2121,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2023,10 +2142,12 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] @@ -2042,14 +2163,16 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 limit 26 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #1" +name = "New History Page Count Query - Unnecessary Joins - Merchant #1" statement = ''' select count(distinct t.id) @@ -2061,12 +2184,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 1 + and wp.merchant_id = 1 + and c.merchant_id = 1 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #2" +name = "New History Page Count Query - Unnecessary Joins - Merchant #2" statement = ''' select count(distinct t.id) @@ -2078,12 +2203,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 2 + and wp.merchant_id = 2 + and c.merchant_id = 2 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #3" +name = "New History Page Count Query - Unnecessary Joins - Merchant #3" statement = ''' select count(distinct t.id) @@ -2095,12 +2222,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 3 + and wp.merchant_id = 3 + and c.merchant_id = 3 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #4" +name = "New History Page Count Query - Unnecessary Joins - Merchant #4" statement = ''' select count(distinct t.id) @@ -2112,12 +2241,14 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 4 + and wp.merchant_id = 4 + and c.merchant_id = 4 ''' -iterations = 50 +iterations = 20 concurrency = 2 [[queries]] -name = "New History Page Count Query - Merchant #5" +name = "New History Page Count Query - Unnecessary Joins - Merchant #5" statement = ''' select count(distinct t.id) @@ -2129,8 +2260,10 @@ statement = ''' status IN (4,7) and ended_time > now() - interval '45 days' and t.merchant_id = 5 + and wp.merchant_id = 5 + and c.merchant_id = 5 ''' -iterations = 50 +iterations = 20 concurrency = 2 [teardown] From eb1cf18fa962e4695d06c50b4a9e0d75ab009711 Mon Sep 17 00:00:00 2001 From: Eylon Ronen Date: Mon, 19 May 2025 11:06:43 +0300 Subject: [PATCH 44/44] Optimize number of shards --- specs/bringg/sql/bringg_setup.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/bringg/sql/bringg_setup.sql b/specs/bringg/sql/bringg_setup.sql index c0023aa..94a7914 100644 --- a/specs/bringg/sql/bringg_setup.sql +++ b/specs/bringg/sql/bringg_setup.sql @@ -116,7 +116,7 @@ create table customers ( 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 6 shards; +) clustered into 12 shards; create table way_points ( id integer, @@ -216,7 +216,7 @@ create table way_points ( 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 6 shards; +) clustered into 12 shards; create table tasks ( id integer, @@ -339,4 +339,4 @@ create table tasks ( 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 6 shards; +) clustered into 12 shards;