Re: Searching in varchar column having 100M records

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Searching in varchar column having 100M records
Date: 2019-07-17 22:54:44
Message-ID: d901d1d8-209f-0c8d-46bf-204d7c901173@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 17/07/2019 23:03, mayank rupareliya wrote:
[...]
> Table and index are created using following query.
>
> create table fields(user_id varchar(64), field varchar(64));
> CREATE INDEX index_field ON public.fields USING btree (field);

[...]

Any particular reason for using varchar instead of text, for field?

Also, as Andreas pointed out, use UUID for the user_id.

Cheers,
Gavin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message mayank rupareliya 2019-07-18 11:51:49 Re: Searching in varchar column having 100M records
Previous Message Andres Freund 2019-07-17 18:52:54 Re: Perplexing, regular decline in performance