pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: raptor <raptor@unacs.bg>
To: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: Many questions
Date: Wed, 29 Sep 1999 14:56:55 -0400
Message-ID: <37F260F7.920D67DB@unacs.bg> (raw)

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
=====




Message-ID: <37F260F7.920D67DB@unacs.bg>
Permalink:  ../37F260F7.920D67DB@unacs.bg/
Also on:    postgresql.org/message-id/37F260F7.920D67DB@unacs.bg

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: raptor@unacs.bg
  Subject: Re: Many questions
  In-Reply-To: <37F260F7.920D67DB@unacs.bg>
  References: <37F260F7.920D67DB@unacs.bg>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox