From: | raptor <raptor(at)unacs(dot)bg> |
---|---|
To: | "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Many questions |
Date: | 1999-09-29 18:56:55 |
Message-ID: | 37F260F7.920D67DB@unacs.bg |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)unacs(dot)bg
=====
From | Date | Subject | |
---|---|---|---|
Next Message | Stuart Rison | 1999-09-29 20:11:24 | self-join and DISTINCT quandry. |
Previous Message | Bruce Momjian | 1999-09-29 17:19:48 | Re: [SQL] Limit rows |