DRDA GATEWAY to IBM - SQL performance
Posted in 1998
Has anyone seen this before? Any suggestions on how we can improve the
performance?
---------------------- Forwarded by Kate Tomchik/IS/SSC/THD on 05/13/98
12:08 PM ---------------------------
I'm hoping you may be able to shed some light on a performance quirk I
noticed when doing a join with a drda (remote) table. The goal is to
populate a temp table with rows from a join of a local table and the remote
table. rlctr_sku is local ans sku is remote. If you code the sql in a
single statement:
INSERT INTO temp_sku
SELECT sku.sku_nbr, sku.sku_desc
FROM rlctr_sku, sku
WHERE rlctr_sku.sku_nbr = sku.sku_nbr
It takes about 3 minutes with the data I had in rlctr_sku.
If I break this into an unload and a load:
UNLOAD TO '/tmp/temp_sku'
SELECT sku.sku_nbr, sku.sku_desc
FROM rlctr_sku, sku
WHERE rlctr_sku.sku_nbr = sku.sku_nbr;
LOAD FROM '/tmp/temp_sku'
INSERT INTO temp_sku;
Then it takes about 40 seconds
I did an sqlexplain on both and in each case they used the same path -
index only on rlctr_sku, and the remote db was sent the same query in both
cases. There was no information output about the INSERT efficiency.