Received: from dual.unacs.bg ([212.5.134.10]) by hub.org (8.9.3/8.9.3) with ESMTP id HAA53121 for ; Wed, 29 Sep 1999 07:51:56 -0400 (EDT) (envelope-from raptor@unacs.bg) Received: from unacs.bg (unverified [212.5.134.23]) by dual.unacs.bg (Rockliffe SMTPRA 2.1.6) with ESMTP id for ; Wed, 29 Sep 1999 13:53:10 +0200 Sender: root Message-ID: <37F260F7.920D67DB@unacs.bg> Date: Wed, 29 Sep 1999 14:56:55 -0400 From: raptor X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i686) X-Accept-Language: en MIME-Version: 1.0 To: "'pgsql-sql@postgresql.org'" Subject: Many questions Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi, I have several quesions. 1. Does $dbh->prepare_cached has some impact on performance for PostgresSQL ? I read the TODO of mod_perl docs :"). But there is discussion only for MySQL & Oracle. 2. Is this the right way to make transactions with DBI : eval { local $h->{RaiseError} = 0 if $h->{RaiseError}; local $h->{AutoCommit} = 0 if $h->{AutoCommit}; .... do something SELECT, INSERT, UPDATE .... } if ($@) {$dbh->rollback} else {$dbh->commit}; after it RaiseError & AutoCommit has their default values ? 3. Is it a good idea at the end of the script to clear the hash - in a perspective of mod_perl. The hash may become very large ? --> %hash = (); HINT : try this to see memory usage of httpd deamons including SHARED memory. You can't see it with "ps". top -b -n 1 | grep -e "httpd\|PID" | cut -b '0-5,24-40' 4. What is the best way to implement something like NextPage, PrevPage (+PageSize) for the DBI query. Something like ADO/IIS similar methods. SELECT ... LIMIT,OFFSET ... stuff ?!?! 5. At the moment I'm using global.asa (ASP.pm) to store some sub's that I use in most of my pages. Is that the right way to do this ? Examples. 6. I saw that the : CREATE UNIQUE INDEX xx ON yy (col1,col2); is different from : CREATE UNIQUE INDEX xx ON yy (col1); CREATE UNIQUE INDEX xx ON yy (col2); is the same true for CREATE INDEX (not unique). Is there way to make UNIQUE case insensitive. 7. How to drop all indexes at once ? Thanx ===== iVAN raptor@unacs.bg =====