I have an entity with 2 @ID
@Entity public class TheTable extends AbstractMMODataObject {
@Id String userId;
@Id long range;
It was a mistake, I really should have just made range an @Index
but it already has millions of records in it.
I am wondering if I query select t from TheTable
t where range
<:bla
without querying the userId
.. will this be bad for performance?
From my understanding, if the range were an index that would have been fine.. but since it's a primary key, I'm not sure if it would perform well like an index, or would it be slow?