Changes between Initial Version and Version 1 of Ticket #35399, comment 6


Ignore:
Timestamp:
Apr 24, 2024, 1:09:32 PM (7 months ago)
Author:
Willem Van Onsem

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35399, comment 6

    initial v1  
    11Hi, that is already in the changeset: in case the item is not hashable, it will raise a type error: we catch that, and then fallback on the original way of doing it, without much delay. So it is more a boosting mechanism that when fails, is "disabled" when running through it.
    22
    3 The hash of an expression indeed is take more time than the one of an `int`, but the idea is that this often will still pay off, since the cascade of Case`-`When` essentially forces the database into linear search, while it *might* be possible that a certain database finds a way, if that is not the case, it will first look at the first `When`, if that fails, the next one, etc. so for ~1000 `When`s, it will on average take 500 items per row.
     3The hash of an expression indeed is take more time than the one of an `int`, but the idea is that this often will still pay off, since the cascade of `Case` - `When` essentially forces the database into linear search, while it *might* be possible that a certain database finds a way, if that is not the case, it will first look at the first `When`, if that fails, the next one, etc. so for ~1000 `When`s, it will on average take 500 items per row.
    44
    55I agree that a temporary table is probably more ideal.
Back to Top