Re: How to find out about index

From: Savita <savita(at)india(dot)hp(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to find out about index
Date: 2002-10-08 08:44:18
Message-ID: 3DA29AE2.D9B23F25@india.hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Martijn and Shridhar

Thanks very much for your help.

I have one more question

When I type the command
CYCLE4#EXPLAIN ANALYZE
CYCLE4# select * from os_customer_master where OUTSOURCER_LEGACY_CUSTOMER_ID='66';
why I get the error
ERROR: parser: parse error at or near "ANALYZE"

is the command what I am typing is correct or it should be typed in different way.

Martijn van Oosterhout wrote:

> On Tue, Oct 08, 2002 at 12:22:15PM +0530, Savita wrote:
> > Hi,
> >
> > What does the row indicate in the NOTICE: QUERY PLAN:
> >
> > I am getting diff-2 values which is not same as the actual row present in the table.
>
> Note that EXPLAIN produces an *estimate* of the number of rows. Obviously it
> can't know the exact number unless it actually runs the query. EXPLAIN
> ANALYZE will give you both the estimate and the actual.
>
> > Seq Scan on os_customer_master (cost=0.00..22.50 rows=10 width=112)
> > Index Scan using cust_1 on os_customer_master (cost=0.00..12.22 rows=11 width=112)
> >
> > I can see that the cost has reduced but the rows has increased. What does
> > this means and also what does width means.
>
> It just means that due to some extra info, it estimates closer to 11 than 10
> rows. It doesn't say anything about how many rows there really are.
>
> The width is the estimated size of the tuples. If there is only one field
> needed, the width will be small. You can see it change if you change the
> columns output.
>
> Try EXPLAIN ANALYZE.
>
> --
> Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> > There are 10 kinds of people in the world, those that can do binary
> > arithmetic and those that can't.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

--
Best Regards
- Savita
----------------------------------------------------
Hewlett Packard (India)
+91 80 2051288 (Phone)
847 1288 (HP Telnet)
----------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2002-10-08 08:54:01 Re: Design question, Does postgres provide a simpler solution than the obvious?
Previous Message Karel Zak 2002-10-08 08:02:39 Re: Server locale?