[Error] user_1 XTDDIndex* XTDDTable::findIndex(datadic_xt.cc:2690) -59: Matching index required

Bug #377788 reported by Vadim Tkachenko on 2009-05-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Vladimir Kolesnikov

Bug Description

I am trying to run tpcc-like workload. After loading 100W I started benchmarks, but getting a lot of errors like this:

090517 16:55:15 [Error] user_1 XTDDIndex* XTDDTable::findIndex(datadic_xt.cc:2690) -59: Matching index required for './pbxttpcc/stock` (`s_w_id`)'
090517 16:55:15 [Error] user_1 XTDDIndex* XTDDTable::findIndex(datadic_xt.cc:2690)

my pbxt parameters:


Next parameters where default values when I loaded database, but later I changed them to:

Related branches

Paul McCullagh (paul-mccullagh) wrote :

Hi Vadim,

This error normally comes from a problem with a FOREIGN KEY definition. Do you know whether foreign keys are defined on the table?

If so, then I would like to have a look at the table definitions.

The FOREIGN_KEY_CHECKS option could be also relevant here.

Vadim Tkachenko (vadim-tk) wrote :
Download full text (4.9 KiB)


This is full script to create
drop table if exists warehouse;


create table warehouse (
w_id smallint not null,
w_name varchar(10),
w_street_1 varchar(20),
w_street_2 varchar(20),
w_city varchar(20),
w_state char(2),
w_zip char(9),
w_tax decimal(4,2),
w_ytd decimal(12,2) ) TYPE=PBXT;

drop table if exists district;

create table district (
d_id tinyint not null,
d_w_id smallint not null,
d_name varchar(10),
d_street_1 varchar(20),
d_street_2 varchar(20),
d_city varchar(20),
d_state char(2),
d_zip char(9),
d_tax decimal(4,2),
d_ytd decimal(12,2),
d_next_o_id int ) TYPE=PBXT;

drop table if exists customer;

create table customer (
c_id int not null,
c_d_id tinyint not null,
c_w_id smallint not null,
c_first varchar(16),
c_middle char(2),
c_last varchar(16),
c_street_1 varchar(20),
c_street_2 varchar(20),
c_city varchar(20),
c_state char(2),
c_zip char(9),
c_phone char(16),
c_since datetime,
c_credit char(2),
c_credit_lim bigint,
c_discount decimal(4,2),
c_balance decimal(12,2),
c_ytd_payment decimal(12,2),
c_payment_cnt smallint,
c_delivery_cnt smallint,
c_data text ) TYPE=PBXT;

drop table if exists history;

create table history (
h_c_id int,
h_c_d_id tinyint,
h_c_w_id smallint,
h_d_id tinyint,
h_w_id smallint,
h_date datetime,
h_amount decimal(6,2),
h_data varchar(24) ) TYPE=PBXT;

drop table if exists new_orders;

create table new_orders (
no_o_id int not null,
no_d_id tinyint not null,
no_w_id smallint not null) TYPE=PBXT;

drop table if exists orders;

create table orders (
o_id int not null,
o_d_id tinyint not null,
o_w_id smallint not null,
o_c_id int,
o_entry_d datetime,
o_carrier_id tinyint,
o_ol_cnt tinyint,
o_all_local tinyint ) TYPE=PBXT;

drop table if exists order_line;

create table order_line (
ol_o_id int not null,
ol_d_id tinyint not null,
ol_w_id smallint not null,
ol_number tinyint not null,
ol_i_id int,
ol_supply_w_id smallint,
ol_delivery_d datetime,
ol_quantity tinyint,
ol_amount decimal(6,2),
ol_dist_info char(24) ) TYPE=PBXT;

drop table if exists item;

create table item (
i_id int not null,
i_im_id int,
i_name varchar(24),
i_price decimal(5,2),
i_data varchar(50) ) TYPE=PBXT;

drop table if exists stock;

create table stock (
s_i_id int not null,
s_w_id smallint not null,
s_quantity smallint,
s_dist_01 char(24),
s_dist_02 char(24),
s_dist_03 char(24),
s_dist_04 char(24),
s_dist_05 char(24),
s_dist_06 char(24),
s_dist_07 char(24),
s_dist_08 char(24),
s_dist_09 char(24),
s_dist_10 char(24),
s_ytd decimal(8,0),
s_order_cnt smallint,
s_remote_cnt smallint,
s_data varchar(50) ) TYPE=PBXT;

ALTER TABLE warehouse ADD CONSTRAINT pkey_warehouse PRIMARY KEY(w_id);
ALTER TABLE district ADD CONSTRAINT pkey_district PRIMARY KEY(d_w_id, d_id);
ALTER TABLE customer ADD CONSTRAINT pkey_customer PRIMARY KEY(c_w_id, c_d_id, c_id);
ALTER TABLE new_orders ADD CONSTRAINT pkey_new_orders PRIMARY KEY(no_w_id, no_d_id, no_o_id);
ALTER TABLE orders ADD CONSTRAINT pkey_orders PRIMARY KEY(o_w_id, o_d_id, o_id);
ALTER TABLE order_line ...



this happens because in some tables you have indexes that don't directly match FKs (but whole prefixes do match). Currently our index-to-FK matching logics looks only dor direct matches. So atm you have to maintain separate indexes for this.

We will work on improving this. It's possible that only index-matching code needs an update (which should be a minor change)

Changed in pbxt:
assignee: nobody → Vladimir Kolesnikov (vkolesnikov)
status: New → Confirmed

s/whole prefixes do match/whose prefixes do match

Changed in pbxt:
importance: Undecided → Low
Changed in pbxt:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers