From: | "alex b(dot)" <mailinglists1(at)gmx(dot)de> |
---|---|
To: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
Cc: | Postgresql General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: caching query results |
Date: | 2003-05-23 16:41:30 |
Message-ID: | 3ECE4F3A.8020909@gmx.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
scott.marlowe wrote:
> by the way, jsp supports connection pooling quite well.
>
> Do you have a specific development environment you have to work in?
oh yeah, sorry, my bad.
I am working with perl.
besides: temporary tables also last only one connection, as the
documentation indicates.
the script does connect, and after printing everything to the browser it
dies... as well as the connection to postgres.
opening the script with the commands to show the next few rows would
again start the same script, but with a different offset...
I'm beginning to give it up, and use a very simple solution: temporary
files - tab delimited. the script would parse the SQL output (from the
file) and I bet this would be almost as fast as querying a table, or
faster... this is just a thought I had, but I think the pure database
solution is a lot fancier and I'd really want to go for that instead...
>
> On Fri, 23 May 2003, alex b. wrote:
>
>
>>hello!
>>
>>yes, I have already found out, that a transaction is over with each
>>CGI-connection and its disconnection...
>>
>>now, I'd be interested in that connection pooling... any ideas, where
>>I'd have to start?
>>
>>TIA
>>
>>
>>scott.marlowe wrote:
>>
>>>On Wed, 21 May 2003, alex b. wrote:
>>>
>>>
>>>
>>>>hello dear people without shaved necks!
>>>>
>>>>as many of you have already told me cursors are the way to go - now I know!
>>>>
>>>>there it is, kindly provided my BILL G.:
>>>>
>>>> BEGIN;
>>>> DECLARE <cursorname> FOR <query>;
>>>> FETCH <number_of_rows> FROM <cursorname>;
>>>> MOVE {FORWARD|BACKWARD} <number_of_rows> IN <cursorname>;
>>>>
>>>>
>>>>THANK YOU ALL VERY VIEL (much in german)!!!
>>>>
>>>>I will now have to implement session ID's into my CGI's...
>>>>
>>>>oh by the way... lets say a transaction has begun and was never
>>>>commited.. what will happen to it?
>>>>
>>>>is there a automatic rollback after a certain time?
>>>>or would there be ton's of open transactions?
>>>
>>>
>>>Well, transactions can't stay open across a disconnect / reconnect, so
>>>you'll have to use some kind of connection pooling to ensure they stay
>>>open between invocations of your cgi scripts.
>>>
>>>What environment are you developing in? Java has pretty good connection
>>>pooling, and so does PERL. PHP, not so good, but you can work around it
>>>if you understand the underlying, uber simple persistant connection
>>>methodology.
>>>
>>>There may be some open source connection pooling packages that can hold
>>>the transactions open for your cgi scripts, but I've not played with
>>>actual CGI in a few years now, so I have no clue how well any thing like
>>>that would work.
>>>
>>>
>>
>>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Reece Hart | 2003-05-23 16:46:25 | Re: [GENERAL] Q: Structured index - which one runs faster? |
Previous Message | Andrew Sullivan | 2003-05-23 16:40:59 | Re: Tool for BackUp |