Re: MySQL is faster than PgSQL but a large margin in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Agreed.  I have a 13 million row table that gets a 100,000 new records every 
week.   There are six indexes on this table.   Right about the time when it 
reached the 10 million row mark updating the table with new records started 
to take many hours if I left the indexes in place during the update.   Indeed 
there was even some suspicion that the indexes were starting to get corrupted 
during the load.  So I decided to fist drop the indexes when I needed to 
update the table.  Now inserting 100,000 records into the table is nearly 
instantaneous although it does take me a couple of hours to build the indexes 
anew.   This is still big improvement since at one time it was taking almost 
12 hours to update the table with the indexes in place.  


Juan

On Thursday 22 December 2005 08:34, Markus Schaber wrote:
> Hi, Madison,
> Hi, Luke,
>
> Luke Lonergan wrote:
> > Note that indexes will also slow down loading.
>
> For large loading bunches, it often makes sense to temporarily drop the
> indices before the load, and recreate them afterwards, at least, if you
> don't have normal users accessing the database concurrently.
>
> Markus


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux