From: | Konstantinos Agouros <elwood(at)agouros(dot)de> |
---|---|
To: | Len Morgan <len-morgan(at)crcom(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org, Konstantinos Agouros <elwood(at)agouros(dot)de> |
Subject: | Re: Yet another Performance Question |
Date: | 2001-04-18 12:27:10 |
Message-ID: | 20010418142710.A13695@rumba.agouros.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)agouros(dot)de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres
From | Date | Subject | |
---|---|---|---|
Next Message | P. A. Bagyenda | 2001-04-18 12:34:14 | Help with a corrupted database (v7.0.3) |
Previous Message | Len Morgan | 2001-04-18 12:18:40 | Re: Yet another Performance Question |