Tom Lane wrote:
Steve Clark <[EMAIL PROTECTED]> writes:
Tom Lane wrote:
Consider testing the conditions on A at the top level, instead of
redundantly checking them inside the sub-query on B.
Thanks for the response Tom, I am a SQL neophyte, so I'll try to
rework the query.
What I meant
Steve Clark <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Consider testing the conditions on A at the top level, instead of
>> redundantly checking them inside the sub-query on B.
> Thanks for the response Tom, I am a SQL neophyte, so I'll try to
> rework the query.
What I meant to suggest was
Tom Lane wrote:
Steve Clark <[EMAIL PROTECTED]> writes:
explain insert into myevents select * from t_unit_event_log a where exists
(select b.event_log_no from myevents b
where a.event_status = 1 and a.event_ref_log_no IS NOT NULL
and a.event_ref_log_no = b.event_lo
Steve Clark <[EMAIL PROTECTED]> writes:
> explain insert into myevents select * from t_unit_event_log a where exists
> (select b.event_log_no from myevents b
> where a.event_status = 1 and a.event_ref_log_no IS NOT NULL
> and a.event_ref_log_no = b.event_log_no and
Martijn van Oosterhout wrote:
On Wed, Aug 27, 2008 at 11:00:54AM -0400, Steve Clark wrote:
So I did an explain and I see it is doing a seq scan in the last sub plan -
there are about 375,000 rows
in myevent - why isn't it using the index instead of doing a seq scan?
create unique index indx1m
On Wed, Aug 27, 2008 at 11:00:54AM -0400, Steve Clark wrote:
> So I did an explain and I see it is doing a seq scan in the last sub plan -
> there are about 375,000 rows
> in myevent - why isn't it using the index instead of doing a seq scan?
>
> create unique index indx1myevents on myevents (eve