Search Postgresql Archives

Re: Performance issue with cross table updates

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

 



Craig Gibson <craiggib@xxxxxxxxx> writes:
> I get a daily CSV file of 6.5 million records. I create a temporary
> table and COPY them in. On completion I create an index on the mdnid
> column. This column is also indexed in table 2. This part is very
> fast. I had some 'checkpoint too often' issues, but that I have
> resolved.

FWIW, you probably should also issue an ANALYZE on the temp table after
you've loaded it.  If you skip that, the planner is working blind as to
column statistics and is quite likely to choose inappropriate plans.

I concur with the other comment that you might be able to make this a
lot faster if you could convert it into a couple of multiple-row
commands instead of doing a manual loop.  But you'd need up-to-date
statistics to get a decent plan for that, too ...

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux