Re: How to speed up the first-time-searching in pgsql?

From: "Tim Bruce - Postgres" <postgres(at)tbruce(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: "zxo102 ouyang" <zxo102(at)gmail(dot)com>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Greg Smith" <gsmith(at)gregsmith(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to speed up the first-time-searching in pgsql?
Date: 2009-05-28 16:40:30
Message-ID: 2485.192.136.50.130.1243528830.squirrel@sm.tbruce.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 28, 2009 01:23, Richard Huxton wrote:
> zxo102 ouyang wrote:
>> Hi there,
>> Thanks for your suggestions. I do have an application running on the
>> machine
>> all the time. In fact, the application keeps writing real-time
>> monitoring
>> data into the database. Based on my understanding of your messages, I
>> can't
>> do anything to speed up the first-time-searching. Probably I can give a
>> waiting process bar to the users and let them wait for the results.
>
> No, I think you missed the detail on some of the answers. There are
> limitations (as discussed in the answers), but the simple suggestion in
> the first answer will probably help a lot.
>
> Set up a scheduled task to run a big search of the database an hour
> before people start work. This can be as simple as a .BAT file running
> "SELECT * FROM big_table" triggered by Windows' Task Scheduler.
>
> --
> Richard Huxton
> Archonet Ltd
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

As a point of note - if you're running Windows XP / Windows NT or higher
(i.e., not Win 9x) you should use .CMD files instead of traditional .BAT
files. While they accomplish the same thing, the .BAT files run in a
"shared" 16-bit environment as opposed to the 32-bit (or 64-bit) memory
space. Any application that crashes in the 16-bit environment will crash
or cause instability in other applications running in the same 16-bit
environment (since it's shared).

Functionally, there is no difference (other than expanded functions) in
the .CMD scripts. All .BAT commands work the same in .CMD - you just need
to rename your .BAT files to .CMD files.

Tim
--
Timothy J. Bruce

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2009-05-28 16:45:41 Re: Postgres registry access using java
Previous Message Alan McKay 2009-05-28 16:15:02 Continuent (was: Postgres Clustering)