Tried adding and indexing an extra prefix column as suggested in the last meeting: result correct, but no performance improvement (> 1 min)
The index being tried out is the default B-Tree index that should work with prefix queries: indices.
The index is alive and is utilized in this pseudo-example of a query (assuming a column prefix_column of a length N prefix):
SELECT * FROM table WHERE prefix_column = first_N_bytes_of_recompiled_code
The concrete counterpart of this query runs within a second.
However this approach is not usable in practice because bytecodes shorter than the prefix length are not matched. Perhaps something can be made out of this?