AW: UUID vs. Sequential ID as Primary
Date: Sat, 13 Apr 2024 16:10:10 +0200 (CEST)
Message-ID: <1713017410268.215712.d0750801366333322f8c9ed79af7f3540df2f280_at_spica.telekom.de>
I didn't notice the thing with 37 MB (thanks :-)). And it is the same for
Sequence that uses Long (8 Bytes). This give me a reason to conduct the
test with Oracle 21 and see if we get the same behaviour (as we are working
with this version).
I must also admit that my tests are initially rudimentary (And it's done in
my spare time, unfortunately not within the project I'm currently working
on). I am simply trying to understand why many teams in our organization
exclusively use UUIDs (and also in many other organizations). But of
course, the whole thing needs to be examined more closely. My hope was that
someone from this list would state whether it is a bad or good practice to
work with UUIDs, providing the reason.
When I worked on projects where only PL/SQL was used, this issue was not
questioned.
Regards
-----Original-Nachricht-----
I raised the concurrency issue for two reasons:
I appreciate that you have a stated requirement to see the ID values before
they are used on the insert - in which case the locally generated UUID is
clearly the sensible option (without doing any testing) because a
round-trip to the database to get the server to generate a UUID has to be
more time-consuming than generating the UUID locally; but you still ought
to test whether the local option turns into a total disaster for saving and
retrieval at your expected level of concurrency.
Regards
On Sat, 13 Apr 2024 at 14:10, ahmed.fikri_at_t-online.de
Regards
Ahmed
Betreff: Re: UUID vs. Sequential ID as Primary
Datum: 2024-04-13T15:35:25+0200
Von: "Jonathan Lewis" <jlewisoracle_at_gmail.com>
An: "list, oracle" <oracle-l_at_freelists.org>
Jonathan Lewis
<mailto:ahmed.fikri_at_t-online.de> <ahmed.fikri_at_t-online.de
<mailto:ahmed.fikri_at_t-online.de> > wrote:
If the UUID method already outperforms sequences in a single session,
then the performance of the sequence method will be even worse in
multiple concurrent sessions. Additionally, UUIDs are generated on the
client side. Therefore, I believe that conducting the test with only one
session is sufficient. My aim was simply to confirm that UUIDs are a
better choice for microservice architecture
Ahmed
--
http://www.freelists.org/webpage/oracle-l
Received on Sat Apr 13 2024 - 16:10:10 CEST