Hi all, how can increase the perfromace of the following query
the select return 300000 row in 6 minuts and there is a primary index on ID field for each table
thanks.
CREATE TABLE DB.TABLE3
AS
(
SELECT
b.ID,
b.FILED1,
b.FILED2,
b.FILED3,
b.FILED4,
b.FILED5,
b.FILED6,
b.FILED7,
b.FILED8,
b.FILED9,
b.FILED10,
b.FILED11,
b.FILED12,
b.FILED13,
A.FILED2,
A.FILED3,
A.FILED4,
A.FILED5,
A.FILED6,
A.FILED7,
A.FILED8,
a.FILED9,
a.FILED10,
a.FILED11,
A.FILED12,
A.FILED13,
A.FILED14
FROM DB.TABLE2 AS a
LEFT JOIN DB.TABLE1
AS b
ON a.ID=B.ID
)
WITH data
PRIMARY INDEX(ID);
the select return 300000 row in 6 minuts and there is a primary index on ID field for each table
thanks.
CREATE TABLE DB.TABLE3
AS
(
SELECT
b.ID,
b.FILED1,
b.FILED2,
b.FILED3,
b.FILED4,
b.FILED5,
b.FILED6,
b.FILED7,
b.FILED8,
b.FILED9,
b.FILED10,
b.FILED11,
b.FILED12,
b.FILED13,
A.FILED2,
A.FILED3,
A.FILED4,
A.FILED5,
A.FILED6,
A.FILED7,
A.FILED8,
a.FILED9,
a.FILED10,
a.FILED11,
A.FILED12,
A.FILED13,
A.FILED14
FROM DB.TABLE2 AS a
LEFT JOIN DB.TABLE1
AS b
ON a.ID=B.ID
)
WITH data
PRIMARY INDEX(ID);