[Info-ingres] De-duplicate a session table

Ingres Forums info-ingres at kettleriverconsulting.com
Thu Jun 4 20:25:14 UTC 2015


Yes:
delete from session.t1 a
where exists (select * from session.t1 b
where a.key_field=b.key_field and b.tid < a.tid);

That should give you a hash join.  That not-in was probably doing an
SE-join.

By the way, make key_field not null if you can.  If you can't, you need
to decide if you want '=' or 'not distinct', ie are nulls unequal or
equal.  For the latter, add "or (a.key_field is null and b.key_field is
null)" to the inner predicate.


-- 
kschendel
------------------------------------------------------------------------
kschendel's Profile: http://community.actian.com/forum/member.php?userid=29
View this thread: http://community.actian.com/forum/showthread.php?t=17553




More information about the Info-ingres mailing list