Re: Strange behaviour of SELECT ... IN
От | Martijn van Oosterhout |
---|---|
Тема | Re: Strange behaviour of SELECT ... IN |
Дата | |
Msg-id | 20020628091413.A15124@svana.org обсуждение исходный текст |
Ответ на | Re: Strange behaviour of SELECT ... IN (Jorge Sarmiento <jsarmiento@ccom.org>) |
Список | pgsql-general |
On Thu, Jun 27, 2002 at 09:44:13AM -0400, Jorge Sarmiento wrote: > > Wrong. The number of rows has everything to do with it. If the number of > > rows exceeds 50% of the table, a sequential scan is faster than an index > > scan. > > Mi database has 3 000 000 registries, my queries are usually of 50 - 100 > rows... so index is faster right? Well, you'll need to send the EXPLAIN ANALYZE output because my ESP module doesn't appear to be working. There is no easy explanation for why a query doesn't use an index scan. > > You can use enable_seq_scan=off to force it. Let us know if the index scan > > is actually significantly faster. > > I have inserted that line in postgresql.conf, and received an error. > where should it be put? In psql: set enable_seq_scan=off or something like that. -- Martijn van Oosterhout <kleptog@svana.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.
В списке pgsql-general по дате отправления: