Re: Slow query on V12.

2019-09-23 Thread nikhil raj
Hi,

Can you check by vacuum analyze  the database. And run the query.


**Remember don't  use Vacuum full.

On Tue, 24 Sep 2019, 12:07 am Luís Roberto Weck, <
[email protected]> wrote:

> Hi!
>
> Recently I've been looking for bloat in my databases and found a query to
> show which tables are more bloated and by how much.
>
> This is the explain plan on v12.3: https://explain.depesz.com/s/8dW8C
> And this is with v11: https://explain.depesz.com/s/diXY
>
> Both databases have approx. the same size and have the same schema, but on
> v12 I the query takes much longer to run.
>
>
>


Query went slow all of sudden. ON V 11.3

2019-10-04 Thread nikhil raj
Hi All,

All of sudden the query went slow before the query was executing in 30- 35
sec now even after 30 mins i am not getting any result.

later I have dropped a table ( t_meners) and recreated it and again it
started working  very fast.

is there way to find what happen on that why is not any issue in table how
to find out. i Have the same issue on the other databases also so that i
can check on it

SELECT ((UID-1)/1) AS BatchNo,
   * INTO "temp_tt1"
FROM
  (SELECT ROW_NUMBER() OVER (
 ORDER BY a."rno") AS UID,
a.*
   FROM "temp_10032019020721_4470" AS a
   INNER JOIN "t_ages" AS b ON LOWER(a."cr") = LOWER(b."c_pagealias")
   LEFT JOIN "t_meners" AS c ON LOWER(a."cr") = LOWER(c."c_id")
   WHERE c."c_id" IS NULL ) AS TempTable


Re: Query went slow all of sudden. ON V 11.3

2019-10-04 Thread nikhil raj
Hi Justin,

Its been executing for 35 + mins due to statement time out its getting
canceled.

Yes temp_10032019020721_4470table index is there on  cr column.


On Fri, Oct 4, 2019 at 6:50 PM Justin Pryzby  wrote:

> On Fri, Oct 04, 2019 at 03:52:26PM +0530, nikhil raj wrote:
> > Hi All,
> >
> > All of sudden the query went slow before the query was executing in 30-
> 35
> > sec now even after 30 mins i am not getting any result.
>
> Can you show "explain(analyze,buffers)" when it's running fast, and at
> least
> "explain" when it's slow ?
>
> > later I have dropped a table ( t_meners) and recreated it and again it
> > started working  very fast.
>
> What indexes exist on that table and on temp_10032019020721_4470 ?
>
> Justin
>