Re: Index problem Need an urgent fix

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: chanukya SDS <chanukyasds(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Index problem Need an urgent fix
Date: 2023-02-03 04:43:43
Message-ID: CAOBaU_aeQDd5tr+DvF_Ov7C4g7QnYwK=1AppqXM=5jr9Xji=0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi,

Le ven. 3 févr. 2023 à 11:33, chanukya SDS <chanukyasds(at)gmail(dot)com> a écrit :

> Hey All,
>
> I have a query like below
>
>
> SELECT * FROM data WHERE val=trunc(val) AND
> acc_id='kfd50ed6-0bc3-44a9-881f-ec89713fdd80'::uuid ORDER BY ct DESC LIMIT
> 10;
>
> table structure is
>
> data
> (id uuid,
> c_id uuid,
> acc_id uuid,
> val numeric,
> ct timestamptz);
>
>
> Can you please help me to write an index?
>
> or Can someone write an index and revert here..
>
> its very urgent for me.
>

pgsql-hackers isn't a suitable mailing list for this question, you should
use psql-general or psql-performance. please also look at
https://wiki.postgresql.org/wiki/Slow_Query_Questions for details to
provide.

note that if you're not really sure of what index would help and don't want
to disturb your database too much (and assuming you don't have another
environment to test things on), you can use hypopg to create hypothetical
indexes and see how many index definitions would behave without actually
creating them: https://github.com/HypoPG/hypopg

>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-02-03 04:43:54 Re: Logical replication timeout problem
Previous Message Bharath Rupireddy 2023-02-03 04:42:10 Re: Index problem Need an urgent fix