Re: q: explain analyze

Поиск
Список
Период
Сортировка
От Mark
Тема Re: q: explain analyze
Дата
Msg-id 20060110191247.65117.qmail@web31907.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: q: explain analyze  (Jaime Casanova <systemguards@gmail.com>)
Ответы Re: q: explain analyze  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: q: explain analyze  (Jaime Casanova <systemguards@gmail.com>)
Список pgsql-general
This is great,
Now here's my explain analyze:

 Seq Scan on balance   (cost=0.00..54.51 rows=147 width=106) (actual
time=0.026..0.767 rows=62 loops=1)
                     Filter: (amount >= 0::double precision)

I do have an index on amount, but I guess it won't be used for >= ...
is there any way to force usage of index?

another question:
Can I defined index for _NOT_EQUAL_ ?

I have a column that can have 5 values and my where is
WHERE type <> 'A' OR type <> 'B'

_or_ better to use:
WHERE type ='C' OR type = 'D' OR type = 'E'

Thank you,

Mark.
--- Jaime Casanova <systemguards@gmail.com> wrote:

> On 1/10/06, Mark <sendmailtomark@yahoo.com> wrote:
> > Hello,
> >
> > When I run 'explain analyze' on a query, how do I know what index
> is
> > used and is it used at all. What are specific words should I look
> > for?
> >
> > Is "Seq Scan" indicates that index has been used?
> > How do I know that it was Full Table Scan?
> >
> > Thanks,
> > Mark.
> >
>
> "Seq Scan" is short for Sequential Scan (Full Table Scan)...
>
> you have to look for the word index to see what indexes are you
> using
> if any (the name of the indexes are used too, so if you now
> indexe's
> names you can find them in the explain analyze quickly)
>
> --
> Atentamente,
> Jaime Casanova
> (DBA: DataBase Aniquilator ;)
>




__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: copy a postgres dbase to the same machine with different name?
Следующее
От: Jerry LeVan
Дата:
Сообщение: ANN: PgBrowser-1.6 and PgBrowser-1.7