Re: Searching in varchar column having 100M records - Mailing list pgsql-performance

From Gavin Flower
Subject Re: Searching in varchar column having 100M records
Date
Msg-id d901d1d8-209f-0c8d-46bf-204d7c901173@archidevsys.co.nz
Whole thread Raw
In response to Searching in varchar column having 100M records  (mayank rupareliya <mayankjr03@gmail.com>)
Responses Re: Searching in varchar column having 100M records
List 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




pgsql-performance by date:

Previous
From: Andres Freund
Date:
Subject: Re: Perplexing, regular decline in performance
Next
From: mayank rupareliya
Date:
Subject: Re: Searching in varchar column having 100M records