Skip to content

Instantly share code, notes, and snippets.

Avatar
🎨
Programming

Abdulrahman Alotaibi abdulrahmanAlotaibi

🎨
Programming
  • Riyadh, KSA
View GitHub Profile
@abdulrahmanAlotaibi
abdulrahmanAlotaibi / numeric_vs_uuid
Created Sep 17, 2022 — forked from jgaskins/numeric_vs_uuid
Comparing numeric vs UUID in Postgres. Rehearsal benchmarks are thrown out. Only the second run is kept. Insertions are done all in one query to minimize the impact of I/O. This is harder to do with retrieval, but the ids are randomized in each one to minimize the effects of caching inside the database.
View numeric_vs_uuid
Inserting
user system total real
Numeric 0.070000 0.010000 0.080000 ( 0.586738)
UUID 0.070000 0.020000 0.090000 ( 3.101085)
Retrieving by id
user system total real
Numeric 0.810000 0.980000 1.790000 ( 6.831551)
UUID 0.830000 0.990000 1.820000 ( 6.981944)
@abdulrahmanAlotaibi
abdulrahmanAlotaibi / numeric_vs_uuid
Created Sep 17, 2022 — forked from jgaskins/numeric_vs_uuid
Comparing numeric vs UUID in Postgres. Rehearsal benchmarks are thrown out. Only the second run is kept. Insertions are done all in one query to minimize the impact of I/O. This is harder to do with retrieval, but the ids are randomized in each one to minimize the effects of caching inside the database.
View numeric_vs_uuid
Inserting
user system total real
Numeric 0.070000 0.010000 0.080000 ( 0.586738)
UUID 0.070000 0.020000 0.090000 ( 3.101085)
Retrieving by id
user system total real
Numeric 0.810000 0.980000 1.790000 ( 6.831551)
UUID 0.830000 0.990000 1.820000 ( 6.981944)