That depends what site you are playing at?
Only Full Tilt writes hand histories automatically, you need a datamining application for the other sites, and Pokerstars only allows 30 hands per session to be imported.
If you have hands being generated and importing OK, then Try some performance tweaking.
Get Beta 15 (if you haven't already) and enable 'enhance HUD performance' on HUD Options.
Download and install PT3.
Please read the
Beta 15 release notes first.
Also have a look at
Performance Tuning PostgreSQL.
Also use the Database menu to cluster, vacuum, analyse your database. (or easier, use Manual Import tab to import a single file with the C,V,A options checked)