Re: Yet another Performance Question
| От | Konstantinos Agouros |
|---|---|
| Тема | Re: Yet another Performance Question |
| Дата | |
| Msg-id | 20010418142710.A13695@rumba.agouros.de обсуждение исходный текст |
| Ответ на | Re: Yet another Performance Question ("Len Morgan" <len-morgan@crcom.net>) |
| Ответы |
Re: Yet another Performance Question
|
| Список | pgsql-general |
On Wed, Apr 18, 2001 at 07:18:40AM -0500, Len Morgan wrote: > >I once read in Oracle Performance Tuning, that if one inserts or changes > large > >amounts of data in a table, it might be better to drop indices before doing > >this and recreating them afterwards. Could someone give a hint on how this > >is in Postgres 7.1? Currently I am experiencing a massive slowdown in > importing > >data. > > Postgres "suffers" the same problem which is very logical if you think about > it. Inserts must adjust the indexes for every record and don't really know > that there are a lot of other rows comming. Also, due to the multiuser > nature of Postgres, other users could be accessing data between your rows of > inserts and that data must be valid at that time. > > A non-indexed version of a table is just as accessible as an indexed one > (though not as fast) so you have to decide if it's better to slow down a > query or two while you insert/index or spend much more time having a good > index after each insert. Frankly what matters is the time it takes alltogether. I have a script that first does a few million inserts, and than queries on this data... these queries don't terminate in a reasonable (<10days) time, if I don't use indices. So I will add some drop/create index-commands to the script... Konstantin -- Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood@agouros.de Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185 ---------------------------------------------------------------------------- "Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres
В списке pgsql-general по дате отправления: