Re: [PERFORM] Seq scan of table?
От | Ron Johnson |
---|---|
Тема | Re: [PERFORM] Seq scan of table? |
Дата | |
Msg-id | 1062778158.17023.205.camel@haggis обсуждение исходный текст |
Ответ на | Re: Seq scan of table? (Jonathan Bartlett <johnnyb@eskimo.com>) |
Список | pgsql-general |
On Fri, 2003-09-05 at 09:39, Jonathan Bartlett wrote: > > I think I have found out why.. I have a where clause on a ID field but it > > seems like I need to cast this integer to the same integer as the field is > > defined in the table, else it will do a tablescan. > > Yes, this is correct > > > Is this assumtion correct? And if it is, do I then need to change all my > > sql's to cast the where clause where I just have a number (eg where field > > = 1) to force the planner to use index scan instead of seq scan? > > Someone correct me if I'm wrong, but I believe numbers are int4's, so they > need to be cast if your column is not an int4. You mean "constant" scalars? Yes, constants scalars are interpreted as int4. -- ----------------------------------------------------------------- Ron Johnson, Jr. ron.l.johnson@cox.net Jefferson, LA USA "Millions of Chinese speak Chinese, and it's not hereditary..." Dr. Dean Edell
В списке pgsql-general по дате отправления: