Thread: Taking lot time

Taking lot time

From
Ramesh T
Date:
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..

Re: Taking lot time

From
Adrian Klaver
Date:
On 11/03/2015 06: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..

And the query is?


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Taking lot time

From
Rob Sargent
Date:
On 11/03/2015 07: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..
I could be way off base (again) but I think the first thing you do is supply the query (sql).

Re: Taking lot time

From
Melvin Davidson
Date:
And in addition to providing the actual query, the structure (and indexes) of all tables involved) are needed.

On Tue, Nov 3, 2015 at 5:59 PM, Rob Sargent <robjsargent@gmail.com> wrote:
On 11/03/2015 07: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..
I could be way off base (again) but I think the first thing you do is supply the query (sql).



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Re: Taking lot time

From
John R Pierce
Date:
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



Re: Taking lot time

From
Ramesh T
Date:
the query is big it's selecting 20 rows from two table like i mentioned above exaplain analyze

what should i do..?any help

On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 11/03/2015 06: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..

And the query is?


--
Adrian Klaver
adrian.klaver@aklaver.com

Re: Taking lot time

From
Melvin Davidson
Date:
And as always, what is the O/S and the version of PostgreSQL??????????????????

On Tue, Nov 17, 2015 at 7:18 AM, Ramesh T <rameshparnanditech@gmail.com> wrote:
the query is big it's selecting 20 rows from two table like i mentioned above exaplain analyze

what should i do..?any help

On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 11/03/2015 06: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..

And the query is?


--
Adrian Klaver
adrian.klaver@aklaver.com




--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Re: Taking lot time

From
Karsten Hilbert
Date:
On Tue, Nov 17, 2015 at 05:48:36PM +0530, Ramesh T wrote:

> the query is big it's selecting 20 rows from two table like i mentioned
> above exaplain analyze
>
> what should i do..?any help

Considering to post the query might be a reasonable first step.

Karsten

> On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver <adrian.klaver@aklaver.com>
> wrote:
>
> > On 11/03/2015 06: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..
> >>
> >
> > And the query is?
> >
> >
> > --
> > Adrian Klaver
> > adrian.klaver@aklaver.com
> >

--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


Re: Taking lot time

From
Adrian Klaver
Date:
On 11/17/2015 04:18 AM, Ramesh T wrote:
> the query is big it's selecting 20 rows from two table like i mentioned
> above exaplain analyze
>
> what should i do..?any help

Please do not top post.

I must be missing a post, as I see no explanation of what the query is
doing.
>
> On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     On 11/03/2015 06: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..
>
>
>     And the query is?
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Taking lot time

From
Ramesh T
Date:

Hi All,
        9.3 version using pgadmin3 

Query like below,20 columns fetching
 SELECT col1,col2,col3,...col.20
                                   FROM detail i,
                                    adjdetail ia,
                                  WHERE i.trans_id = ia.detail_id AND (i.event = ANY (ARRAY[21, 22, 3, 5]))
created indexes on  where clause declared columns.

Taking a lot of time above ..?any help apprectiated !.

I have total 4 gb ram,i changed below in postgres.conf

shared_buffers--1024mb
temp_bufffers=8mb
work_mem=200mb
maintanace_work_mem=500mb
seq_page_cost = 1.0 
random_page_cost = 5.0            
effective_cache_size = 1024MB



On Wed, Nov 18, 2015 at 11:12 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 11/17/2015 04:18 AM, Ramesh T wrote:
the query is big it's selecting 20 rows from two table like i mentioned
above exaplain analyze

what should i do..?any help

Please do not top post.

I must be missing a post, as I see no explanation of what the query is doing.

On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>> wrote:

    On 11/03/2015 06: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..


    And the query is?


    --
    Adrian Klaver
    adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>




--
Adrian Klaver
adrian.klaver@aklaver.com

Re: Taking lot time

From
Adrian Klaver
Date:
On 11/25/2015 07:46 AM, Ramesh T wrote:

First, please take a look at this:

https://en.wikipedia.org/wiki/Posting_style

>
> Hi All,
>          9.3 version using pgadmin3
>
> Query like below,20 columns fetching
>   SELECT col1,col2,col3,...col.20

When this thread started you said you where selecting 20 rows.
Which is correct 20 rows or columns and if columns how many rows?

>                                     FROM detail i,
>                                      adjdetail ia,
>                                    WHERE i.trans_id = ia.detail_id AND
> (i.event = ANY (ARRAY[21, 22, 3, 5]))
> created indexes on  where clause declared columns.
>
> Taking a lot of time above ..?any help apprectiated !.

A lot of time being?

Where are you measuring this time?
Remember populating a GUI with lots of data can take time.

>
> I have total 4 gb ram,i changed below in postgres.conf
>
> shared_buffers--1024mb
> temp_bufffers=8mb
> work_mem=200mb
> maintanace_work_mem=500mb
> seq_page_cost = 1.0
> random_page_cost = 5.0
> effective_cache_size = 1024MB
>
>
>
> On Wed, Nov 18, 2015 at 11:12 PM, Adrian Klaver
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     On 11/17/2015 04:18 AM, Ramesh T wrote:
>
>         the query is big it's selecting 20 rows from two table like i
>         mentioned
>         above exaplain analyze
>
>         what should i do..?any help
>
>
>     Please do not top post.
>
>     I must be missing a post, as I see no explanation of what the query
>     is doing.
>
>
>         On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver
>         <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>         <mailto:adrian.klaver@aklaver.com
>         <mailto:adrian.klaver@aklaver.com>>> wrote:
>
>              On 11/03/2015 06: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..
>
>
>              And the query is?
>
>
>              --
>              Adrian Klaver
>         adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>         <mailto:adrian.klaver@aklaver.com
>         <mailto:adrian.klaver@aklaver.com>>
>
>
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Taking lot time

From
Adrian Klaver
Date:
On 11/25/2015 07:46 AM, Ramesh T wrote:
>
> Hi All,
>          9.3 version using pgadmin3
>
> Query like below,20 columns fetching
>   SELECT col1,col2,col3,...col.20
>                                     FROM detail i,
>                                      adjdetail ia,
>                                    WHERE i.trans_id = ia.detail_id AND
> (i.event = ANY (ARRAY[21, 22, 3, 5]))
> created indexes on  where clause declared columns.
>
> Taking a lot of time above ..?any help apprectiated !.

Realized my previous post was not really helpful. What I should have
said is below.

To get a useful answer you will need to supply a complete(from one run
of the query) set of information for the problem you are experiencing.

So:

1) The complete definitions for the tables involved in the query,
including FKs, triggers, etc.

2) The query you are running.

3) The EXPLAIN ANALYZE for said query

4) The number of rows returned from the query.

5) The procedure you used to getting the time value and where it was
applied(psql, pgAdmin, etc).

>
> I have total 4 gb ram,i changed below in postgres.conf
>
> shared_buffers--1024mb
> temp_bufffers=8mb
> work_mem=200mb
> maintanace_work_mem=500mb
> seq_page_cost = 1.0
> random_page_cost = 5.0
> effective_cache_size = 1024MB
>
>
>
> On Wed, Nov 18, 2015 at 11:12 PM, Adrian Klaver
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     On 11/17/2015 04:18 AM, Ramesh T wrote:
>
>         the query is big it's selecting 20 rows from two table like i
>         mentioned
>         above exaplain analyze
>
>         what should i do..?any help
>
>
>     Please do not top post.
>
>     I must be missing a post, as I see no explanation of what the query
>     is doing.
>
>
>         On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver
>         <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>         <mailto:adrian.klaver@aklaver.com
>         <mailto:adrian.klaver@aklaver.com>>> wrote:
>
>              On 11/03/2015 06: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..
>
>
>              And the query is?
>
>
>              --
>              Adrian Klaver
>         adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>         <mailto:adrian.klaver@aklaver.com
>         <mailto:adrian.klaver@aklaver.com>>
>
>
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Taking lot time

From
Melvin Davidson
Date:
Adrian,

He never stated what the O/S is. I strongly suspect that he is using PgAdmin to connect to a remote server, which adds another degree of complication. So at the very least, we also need to know if the server is local or remote and what the O/S is. Plus, as you have requested before, exactly what time is "a long time"?

On Wed, Nov 25, 2015 at 3:50 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 11/25/2015 07:46 AM, Ramesh T wrote:

Hi All,
         9.3 version using pgadmin3

Query like below,20 columns fetching
  SELECT col1,col2,col3,...col.20
                                    FROM detail i,
                                     adjdetail ia,
                                   WHERE i.trans_id = ia.detail_id AND
(i.event = ANY (ARRAY[21, 22, 3, 5]))
created indexes on  where clause declared columns.

Taking a lot of time above ..?any help apprectiated !.

Realized my previous post was not really helpful. What I should have said is below.

To get a useful answer you will need to supply a complete(from one run of the query) set of information for the problem you are experiencing.

So:

1) The complete definitions for the tables involved in the query, including FKs, triggers, etc.

2) The query you are running.

3) The EXPLAIN ANALYZE for said query

4) The number of rows returned from the query.

5) The procedure you used to getting the time value and where it was applied(psql, pgAdmin, etc).


I have total 4 gb ram,i changed below in postgres.conf

shared_buffers--1024mb
temp_bufffers=8mb
work_mem=200mb
maintanace_work_mem=500mb
seq_page_cost = 1.0
random_page_cost = 5.0
effective_cache_size = 1024MB



On Wed, Nov 18, 2015 at 11:12 PM, Adrian Klaver
<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:

    On 11/17/2015 04:18 AM, Ramesh T wrote:

        the query is big it's selecting 20 rows from two table like i
        mentioned
        above exaplain analyze

        what should i do..?any help


    Please do not top post.

    I must be missing a post, as I see no explanation of what the query
    is doing.


        On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver
        <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
        <mailto:adrian.klaver@aklaver.com
        <mailto:adrian.klaver@aklaver.com>>> wrote:

             On 11/03/2015 06: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..


             And the query is?


             --
             Adrian Klaver
        adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
        <mailto:adrian.klaver@aklaver.com
        <mailto:adrian.klaver@aklaver.com>>




    --
    Adrian Klaver
    adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>




--
Adrian Klaver
adrian.klaver@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Re: Taking lot time

From
Ramesh T
Date:
When this thread started you said you where selecting 20 rows.

Yes.
Which is correct 20 rows or columns and if columns how many rows?
Yes,I did selected 20 columns from two tables.


Where are you measuring this time?
Here is the query plan,


Any Help appreactiated !

On Thu, Nov 26, 2015 at 12:04 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 11/25/2015 07:46 AM, Ramesh T wrote:

First, please take a look at this:

https://en.wikipedia.org/wiki/Posting_style


Hi All,
         9.3 version using pgadmin3

Query like below,20 columns fetching
  SELECT col1,col2,col3,...col.20

When this thread started you said you where selecting 20 rows.
Which is correct 20 rows or columns and if columns how many rows?

                                    FROM detail i,
                                     adjdetail ia,
                                   WHERE i.trans_id = ia.detail_id AND
(i.event = ANY (ARRAY[21, 22, 3, 5]))
created indexes on  where clause declared columns.

Taking a lot of time above ..?any help apprectiated !.

A lot of time being?

Where are you measuring this time?
Remember populating a GUI with lots of data can take time.


I have total 4 gb ram,i changed below in postgres.conf

shared_buffers--1024mb
temp_bufffers=8mb
work_mem=200mb
maintanace_work_mem=500mb
seq_page_cost = 1.0
random_page_cost = 5.0
effective_cache_size = 1024MB



On Wed, Nov 18, 2015 at 11:12 PM, Adrian Klaver
<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:

    On 11/17/2015 04:18 AM, Ramesh T wrote:

        the query is big it's selecting 20 rows from two table like i
        mentioned
        above exaplain analyze

        what should i do..?any help


    Please do not top post.

    I must be missing a post, as I see no explanation of what the query
    is doing.


        On Wed, Nov 4, 2015 at 4:27 AM, Adrian Klaver
        <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
        <mailto:adrian.klaver@aklaver.com
        <mailto:adrian.klaver@aklaver.com>>> wrote:

             On 11/03/2015 06: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..


             And the query is?


             --
             Adrian Klaver
        adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
        <mailto:adrian.klaver@aklaver.com
        <mailto:adrian.klaver@aklaver.com>>




    --
    Adrian Klaver
    adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>




--
Adrian Klaver
adrian.klaver@aklaver.com

Re: Taking lot time

From
Albe Laurenz
Date:
It is difficult to read your e-mails.

Ramesh T wrote:
>> When this thread started you said you where selecting 20 rows.
> 
> Yes.

>> Which is correct 20 rows or columns and if columns how many rows?
> 
> Yes,I did selected 20 columns from two tables.

>> Where are you measuring this time?
> 
> Here is the query plan,
> http://explain.depesz.com/s/EeYT

This explain output says that you selected 699560 rows.
But 11 seconds seems long for that.
How fast is your I/O system and your CPU?

Yours,
Laurenz Albe