sql register entries (within group)


sql register entries (within group)



i have little problem i'm certain best proceed repair it, i wholly have unparalleled opening database (oracle) itself.
in the list "event" have 160k entries, any eventuality groupid normal opening accurately 5 rows same groupid. due bug now integrate register entries (duplicate, 10 rows instead 5, only opposite eventid. competence change, it's only <> 5). need filter entries groups.



due unparalleled opening database surrogate table, nor supplement an index groupid buttress faster.



we groupids query, nonetheless need second query indispensable data



select a."groupid"
from "event" a
group a."groupid"
having count(a."groupid") <> 5


one fortitude subselect:



select *
from "event" a
where a."groupid" (
name b."groupid"
"event" b
organisation b."groupid"
carrying count(b."groupid") <> 5
)


without an index groupid 160k entries, takes many too long.
tried pondering join hoop this, nonetheless can't good fortitude far.



anybody good fortitude maybe?



small edit:
we don't have 100% duplicates here, any opening still unparalleled id groupid unparalleled presumably (that's since need "group by") - maybe i only skip an easy fortitude :)



small instance information (i don't wish mislay it, only it)




eventid | groupid | typeid

123456    123       12

123457    123       145

123458    123       2612

123459    123       41

123460    123       238



234567    123       12

234568    123       145

234569    123       2612

234570    123       41

234571    123       238



it some-more columns, timestamp etc, nonetheless already, all identical, besides eventid.



we run some-more mostly testing, bug check happens again.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?