Hi folks, I'm working on an embedded H2 DB and one of the tables uses a UUID as its PK.
One of the queries that run on that table selects all columns using the IN operator as its WHERE clause. The query looks like this: > > SELECT * FROM CONTROLLER WHERE ( > ID IN ( > '00000000-0000-0000-0000-000000000003', > '00000000-0000-0000-0000-000000000005', > '00000000-0000-0000-0000-000000000006'................<long list of > randomly generated UUIDs> > ) > ) > ORDER BY ID ASC LIMIT 2 OFFSET 0 The query runs about 20 times slower compared to a similar query when the PK is a BIGINT. I appreciate that doing a lookup on a UUID takes longer than a number; my question is: Is this the only reason that I'm seeing this low performance? Is there anything I can do to improve this without modifying my table's PK column type? Thanks. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
