pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James(王旭) <wangxu@gu360.com>
To: Imre Samu <pella.samu@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?
Date: Fri, 22 Nov 2019 10:50:53 +0800
Message-ID: <tencent_74BC96994E7316FA7599BF68@qq.com> (raw)
In-Reply-To: <CAJnEWwkQPV5U-5Y63OgdPUi1-i=Lthn-Y8QmSVcv7QKVAWK8Ww@mail.gmail.com>
References: <tencent_3E7AB8853A9009844041E40C@qq.com>
	<31811a45f443e5dbf08352440d635ee739130ac4.camel@cybertec.at>
	<tencent_0AB3C9A923EF84897A70A0B2@qq.com>
	<tencent_7D928F1D07BB9EF40A19F3D3@qq.com>
	<CAJnEWwkQPV5U-5Y63OgdPUi1-i=Lthn-Y8QmSVcv7QKVAWK8Ww@mail.gmail.com>

Thanks Imre, this is a very important comment, 128 bits is much smaller than 45*8+2=362.


Very glad to know that, thank you very much!


James
 
 
------------------ Original ------------------
From:  "Imre Samu"<pella.samu@gmail.com>;
Date:  Thu, Nov 21, 2019 08:39 PM
To:  "James(王旭)"<wangxu@gu360.com>; 
Cc:  "pgsql-general"<pgsql-general@postgresql.org>; 
Subject:  Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

 

>  uuid character varying(45) NOT NULL,


Just a comment.
IF this is a real UUID ( RFC 4122, ISO/IEC 9834-8:2005 ) ; 
THEN you can use the built in  "UUID Type"  https://www.postgresql.org/docs/11/datatype-uuid.html




"UUID would be the fastest because its 128 bits -> 16 bytes and comparisons are done numerically."
https://stackoverflow.com/questions/32189129/performance-difference-between-uuid-char-and-varchar-in...

The smaller size can be important for your index size ! :   "quotes_pkey PRIMARY KEY (symbol_id, uuid);"


Imre

view thread (8+ messages)

Message-ID: <tencent_74BC96994E7316FA7599BF68@qq.com>
Permalink:  ../tencent_74BC96994E7316FA7599BF68@qq.com/
Also on:    postgresql.org/message-id/tencent_74BC96994E7316FA7599BF68@qq.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: wangxu@gu360.com, pella.samu@gmail.com
  Subject: Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?
  In-Reply-To: <tencent_74BC96994E7316FA7599BF68@qq.com>
  References: <tencent_3E7AB8853A9009844041E40C@qq.com> <31811a45f443e5dbf08352440d635ee739130ac4.camel@cybertec.at> <tencent_0AB3C9A923EF84897A70A0B2@qq.com> <tencent_7D928F1D07BB9EF40A19F3D3@qq.com> <CAJnEWwkQPV5U-5Y63OgdPUi1-i=Lthn-Y8QmSVcv7QKVAWK8Ww@mail.gmail.com> <tencent_74BC96994E7316FA7599BF68@qq.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox