[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: Related to Foreign Table Accessing
From:       ROHIT SACHDEVA <sachdeva.rohit648 () gmail ! com>
Date:       2023-11-30 15:57:08
Message-ID: CAKDb7aHXigCNAB=pn=Wg9PVxVneu2Pxmd2PATvMknFYmmS280A () mail ! gmail ! com
[Download RAW message or body]

Hi Team,

When i run the same query via client it takes around 2 seconds and when it
is run at application side it is taking around 40 seconds

Examples
select animal_id  from table  where owner_id in ()
limit 200 offset 1600  -- takes 2 seconds
select animal_id  from table  where owner_id in ()
limit 200 offset 1800 --takes 40 seconds.

What will be this issue?

On Tue, Nov 28, 2023 at 2:08 PM ROHIT SACHDEVA <sachdeva.rohit648@gmail.com>
wrote:

> Hi Team,
> The application team is accessing a foreign table in batches of 200 rows,
> but the problem they are facing is that the query is taking different times
> for the same set of rows.
> The foreign table is only 1 shard with a partition of 21, and the
> partition we are using is a hash partition.
>
> What can I do at the database side to debug this or any configuration
> parameter related to this wired behavior?
> Have a Good day !!!
>
> Regards
> Rohit Sachdeva
>


-- 
Have a Good day !!!

Regards
Rohit Sachdeva

[Attachment #3 (text/html)]

<div dir="ltr">Hi Team,<div><br></div><div>When i run the same query via client it \
takes around  2 seconds and when it is run at application side it is taking around 40 \
seconds  </div><div><br></div><div>Examples  </div><div>select animal_id   from table \
where owner_id in ()<br>limit 200 offset 1600   -- takes 2 seconds  \
<br></div><div>select animal_id   from table   where owner_id in ()<br>limit 200 \
offset 1800 --takes 40 seconds.<br></div><div><br></div><div>What  will be this \
issue?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On \
Tue, Nov 28, 2023 at 2:08 PM ROHIT SACHDEVA &lt;<a \
href="mailto:sachdeva.rohit648@gmail.com">sachdeva.rohit648@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p \
style="color:rgb(37,37,37)">Hi Team,<br>The application team is accessing a foreign \
table in batches of 200 rows, but the problem they are facing is that the query is \
taking different times for the same set of rows.<br>The foreign table is only 1 shard \
with a partition of 21, and the partition we are using is a hash partition.</p> <p \
style="color:rgb(37,37,37)">What can I do at the database side to debug this or any \
configuration parameter related to this wired behavior?</p><div>Have a Good day \
!!!</div><div><div dir="ltr" class="gmail_signature"><br>Regards<br>Rohit \
Sachdeva</div></div></div> </blockquote></div><br clear="all"><div><br></div><span \
class="gmail_signature_prefix">-- </span><br><div dir="ltr" \
class="gmail_signature">Have a Good day !!!<br><br>Regards<br>Rohit Sachdeva</div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic