Subject | Re: [firebird-support] Re: IN, sub-select and select distinct |
---|---|
Author | Jerome Bouvattier |
Post date | 2004-03-12T11:00:26Z |
Hello Svein,
the few necessary values, I would have come close to the hardcoding version.
denormalization for now.
Regards.
--
Jerome
> > I can't believe there is no way to achieve the "explicit IN"Indeed. I tried and it only comes close to the sub-select way.
> > performance with a JOIN, a sub-select or anything else.
>
> I generally like using EXISTS, but I don't think it can beat the
> alternatives already mentioned.
> And trying to look up values anywhereSure, but I thought that with one end of the JOIN/sub-select containing only
> can never beat hardcoding values, it is like trying to access the
> harddisk quicker than the RAM.
the few necessary values, I would have come close to the hardcoding version.
> If this is a query that is executed often and speed is essential, thenThanks, I'll keep that idea somewhere. But I'd prefer to avoid
> I'd say your only really quick alternative would be to make another
> table and populate it through AFTER INSERT/UPDATE/DELETE triggers from
> your main table. Then you could simply do
> SELECT <whatever> FROM <NewTriggerPopulatedTable>
> whenever you needed these values.
denormalization for now.
Regards.
--
Jerome