SEQUENTIAL SCANS
- From: mohitanchlia@xxxxxxxxx
- Date: Thu, 6 Dec 2007 09:21:27 -0800 (PST)
Version IDS 10
I am running a query something like this:
table A (column s, column t, column u, column v)
table A has individual index on column s.
table A has another individual index on column t.
table A has another individual index on column u.
Update stats have run as high on these columns
table B (column w, column x)
table B has individual index on column w.
table B has another individual index on column x.
Update stats have run as high on these columns
select * from A, B where A.s = 1200 and B.w = A.t;
Above query correctly takes INDEX PATH.
Now I change the query to:
select * from A, B where A.s = 1200 and (B.w = A.t or B.w = A.u);
set explain shows that it did SEQUENTIAL SCAN on table B.
It's perplexing why would optimizer behave like this. It should be
taking index path for the second query too.
.
- Follow-Ups:
- Re: SEQUENTIAL SCANS
- From: bozon
- Re: SEQUENTIAL SCANS
- From: david@xxxxxxxxxxxxx
- Re: SEQUENTIAL SCANS
- From: bozon
- Re: SEQUENTIAL SCANS
- From: Jonathan Leffler
- Re: SEQUENTIAL SCANS
- Prev by Date: Re: tblsnum in onstat -k
- Next by Date: Re: Pls Help: Cannot install IDS 7.30.UC7-1 on Fedora 8. Segmentation fault
- Previous by thread: Re: informix.com
- Next by thread: Re: SEQUENTIAL SCANS
- Index(es):
Relevant Pages
|
|