New answers tagged

1

What Laurenz said is true, but I've actually found a more measurable difference in performance when you try to use those UUID fields in predicates (e.g. in JOIN, WHERE, and HAVING clauses). Again, it'll depend on the amount of data between the tables your predicates are for, but a comparison between a 16 byte value and another 16 byte value is somewhat ...


2

It is easy enough to benchmark this, but the INSERT performance of UUIDs will be worse, because they are bigger and slower to generate. But it doesn't sound like you are building a high performance application anyway (then you probably wouldn't be using JSON), so it probably won't make much difference. Finally, you want to use UUIDs for security reasons (...


1

If you're trying to store key-value pairs of data you should use a key-value store database instead of SQLite, since SQLite is meant to store relational data. Where is your database going to live?...mobile device or dedicated server? If you do stick to SQLite though, file size is not much of a factor in terms of read and write speeds. Rather you're probably ...


1

I'm not sure I understood what you're asking, but if your question is how to determine what columns constitute a table's primary key you can query the catalog like so: select c.conname constraint_name, o.relname table_name, a.attname column_name from pg_constraint c inner join pg_class o on c.conrelid = o.oid inner join pg_attribute a on c.conrelid = ...


Top 50 recent answers are included