Re: Is there any method to keep table in memory at startup

From: Vinay Jain <vinayj(at)sarathi(dot)ncst(dot)ernet(dot)in>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there any method to keep table in memory at startup
Date: 2004-05-07 12:51:25
Message-ID: 409B864D.5040406@sarathi.ncst.ernet.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:

>Vinay Jain said:
>
>
>>Andrew Dunstan wrote:
>>
>>
>>
>>>If course it is not loaded each time. That would be insane. If not
>>>preloaded it is loaded when first called in each process, and then
>>>kept. It is never unloaded (except by the termination of the process
>>>that loaded it).
>>>
>>>It seems you have been laboring under a misapprehension.
>>>
>>>
>>>
>>If this is the case than I can make connection to data base in starting
>> of indchar.so file and close connection at end of it and it should
>>work.... bingo!!
>>it would solve my problem
>>
>>
>>
>
>*sigh*
>
>You are not getting it.
>
>An immutable function MUST NOT DEPEND ON DATA IN THE DATABASE. Sorry to
>shout but you really need to understand this.
>
>Use static C data, not database tables. In addition to it being pure, it
>will also be enormously faster than getting data from the database. Yes it
>means that if you want to change the lookup data you need to recompile
>your C function library, and to redo any indexes etc. that depend on the
>function. That's just the way it is, I'm afraid.
>
>cheers
>
>andrew
>Hi
>
ya you are right but i wanted to escape from compilation and stuff....

I will think on declaring function stable rather than immutable and test
performance....
for the time being i will follow your advice...
thanks
regards
Vinay

>
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gaetano Mendola 2004-05-07 13:09:58 Re: COPY command - CSV files
Previous Message Andrew Dunstan 2004-05-07 12:25:28 Re: Is there any method to keep table in memory at startup