Re: Taking lot time - Mailing list pgsql-general

From John R Pierce
Subject Re: Taking lot time
Date
Msg-id 56393FF9.9050205@hogranch.com
Whole thread Raw
In response to Taking lot time  (Ramesh T <rameshparnanditech@gmail.com>)
List pgsql-general
On 11/3/2015 6:42 AM, Ramesh T wrote:
> I have a Query it taking a lot of time to fetch results
> so,explain query gave
>
> "Hash Join  (cost=55078.00..202405.95 rows=728275 width=418)"
> "  Hash Cond: (itd.tran_id = iad._adj__id)"
> "  ->  Seq Scan on inv_detail itd  (cost=0.00..40784.18 rows=731029
> width=95)"
> "        Filter: (event_type = ANY ('{21,22,3,5}'::integer[]))"
> "  ->  Hash  (cost=20590.78..20590.78 rows=610978 width=331)"
> "        ->  Seq Scan on inv_adj  iad  (cost=0.00..20590.78
> rows=610978 width=331)"
>
> Can you Please let me know wt happen in query..?wt should i do..

assuming those estimates are correct, it appears to be doing a
sequential scan of 610000 rows 731000 times.

--
john r pierce, recycling bits in santa cruz



pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: Taking lot time
Next
From: Leonardo M. Ramé
Date:
Subject: MinGW-W64 compile error