Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

From: James(王旭) <wangxu(at)gu360(dot)com>
To: Imre Samu <pella(dot)samu(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?
Date: 2019-11-22 02:50:53
Message-ID: tencent_74BC96994E7316FA7599BF68@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

&nbsp;

&gt;&nbsp; uuid character varying(45) NOT NULL,

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

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

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

Imre

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2019-11-22 05:14:06 Re: Adding LIMIT changes PostgreSQL plan from good to a bad one
Previous Message Dave Hughes 2019-11-21 22:40:28 Re: Help with configuring pgAudit