COMPLEX SNAPSHOTs much slower than SELECT?

From: Ken R. (MI) <"Ken>
Date: Sat, 02 Dec 2000 13:41:20 GMT
Message-ID: <4_6W5.127086$hD4.31379272_at_news1.rdc1.mi.home.com>


What can cause a COMPLEX SNAPSHOT to be much slower than its corresponding SELECT? My COMPLEX SNAPSHOT performs a SELECT from one table, filtered by conditions that meet one of two subselects:

CREATE SNAPSHOT S1 AS
SELECT *
FROM T1
WHERE C1 IN (SELECT C3 FROM <some join>)

         OR C2 IN (SELECT C4 FROM <some other join>)

Each of the subselects are four table joins, whose select column is an indexed column on T1. All referenced tables are remote. The master database has been ANALYZEd, and the EXPLAIN PLAN looks OK. But the EXPLAIN PLAN is built from the SELECT statement only.

Also, the COMPLEX SNAPSHOTs that create a table similar to the subselects runs in seconds!!

Issuing any of the subselects independently (from the target db back to the master through a link), as well as the outer select with its subselects takes about 1 second! But the complete refresh is over an hour.

/* this takes a second or two, even though its select is the same as the defining query above!!! */
SELECT *
FROM T1
WHERE C1 IN (SELECT C3 FROM <some join>)

         OR C2 IN (SELECT C4 FROM <some other join>)

A month ago, this same SNAPSHOT ran in seconds. No changes to the defining query and minor data growth in the master table have occurred. Received on Sat Dec 02 2000 - 14:41:20 CET

Original text of this message