Re: Creating index does not make any change in query plan.
От | Shridhar Daithankar |
---|---|
Тема | Re: Creating index does not make any change in query plan. |
Дата | |
Msg-id | 3E50EC7F.5180.8F640EB@localhost обсуждение исходный текст |
Ответ на | Re: Creating index does not make any change in query plan. (Deepa <kdeepa@midascomm.com>) |
Ответы |
Re: Creating index does not make any change in query plan.
|
Список | pgsql-general |
On 17 Feb 2003 at 14:15, Deepa wrote: > Hi Shridhar, > Its 100,000 records. > > Thanks a lot. When I do a select as explained by you I can able to > see the difference between Query plan for indexed and non indexed columns. > > Here an integer used as a string. Why when it selected as a > integer, the query plan doesn't do a index scan, but when selected as a string, > the query planner uses index scan. What could be the possible reason? It is very simple. Unless the indexed field and the field in query does not match exactly in type, the planner does not consider using index. What would be good in planner is to have field promotion like in C/C++, smallint->bigint->float->double as and when required. That would help a hell lot many people.. Bye Shridhar -- aquadextrous, adj.: Possessing the ability to turn the bathtub faucet on and off with your toes. -- Rich Hall, "Sniglets"
В списке pgsql-general по дате отправления: