Re: Index problem Need an urgent fix

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: chanukya SDS <chanukyasds(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Index problem Need an urgent fix
Date: 2023-02-03 04:42:10
Message-ID: CALj2ACWozkGRfbvMN2MxAjyxcEZDsUejv6PZgq8mMcb_F86zzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 3, 2023 at 9:03 AM chanukya SDS <chanukyasds(at)gmail(dot)com> wrote:
>
> 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.

Thanks for reaching out. I think the question is more generic without
the problem being described. Is the SELECT query taking more time? If
yes, why? Have you looked at EXPLAIN (ANALYZE...) output? Have you
tried to tune/vary configuration settings to see if it helps?

Also, the best place to ask this question is pgsql-general or pgsql-sql.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2023-02-03 04:43:43 Re: Index problem Need an urgent fix
Previous Message Bharath Rupireddy 2023-02-03 04:22:37 Re: when the startup process doesn't (logging startup delays)