Closed barucho closed 7 years ago
Although this really is a simple JOIN, the amount of data retrieved there is huge. So, I don't think is a problem with the JOIN query itself but the amount of data returned there. To make it clear, could you try to run with a limit:
select i.i_id from item i,order_line o
where o.ol_i_id=i.i_id
limit 100
Btw, we already have an issue open for querying thousand of records: https://github.com/sqlectron/sqlectron-gui/issues/129
Since the issue is answered and we have an issue for querying thousands of records, I'll close this one.
Hi i run just run : select i.i_id from item i,order_line o where o.ol_i_id=i.i_id and the GUI hand - no running query in the mysql this run successfully on mysql or mysql workbench .
order_line have 600k records item have 1m records
to create tables CREATE TABLE
order_line
(ol_w_id
int(11) NOT NULL,ol_d_id
int(11) NOT NULL,ol_o_id
int(11) NOT NULL,ol_number
int(11) NOT NULL,ol_i_id
int(11) DEFAULT NULL,ol_delivery_d
datetime DEFAULT NULL,ol_amount
int(11) DEFAULT NULL,ol_supply_w_id
int(11) DEFAULT NULL,ol_quantity
int(11) DEFAULT NULL,ol_dist_info
char(24) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (ol_w_id
,ol_d_id
,ol_o_id
,ol_number
), KEYsec_i_id
(ol_i_id
) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;CREATE TABLE
item
(i_id
int(6) NOT NULL,i_im_id
int(11) DEFAULT NULL,i_name
varchar(24) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,i_price
decimal(5,2) DEFAULT NULL,i_data
varchar(50) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (i_id
) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;