Re: Postgres performance

Поиск
Список
Период
Сортировка
От Mauro Bertoli
Тема Re: Postgres performance
Дата
Msg-id 20050306144219.43338.qmail@web51408.mail.yahoo.com
обсуждение исходный текст
Ответ на Postgres performance  (bertolima@yahoo.it (mauro))
Список pgsql-sql
> > No, I haven't foreign keys in the older version,
> in
> > that new I've it... however I manage relations
> from
> > app code (PHP)...
> 
>     Really ?
>     In my experience this is a sure way to get
> inconsistencies slowly  
> creeping into your database, and you also get a load
> of funky concurrency  
> issues.
Yes, you are rigth... my insert/update are very simple
and without problems and so I think to use 'foreign
key' coded to make faster/simpler the management and
don't overloading the db (and use exception code
management )... but I had a problem with pgSQL because
server was very busy and the same query was replicate
(because users refresh the page... :( ) so now I've
foreign keys...


>     Now, in PHP, you can use mysql_pconnect instead of
> mysql_connect to get a  
> persistent connection. mod_php keeps a pool of
> connections. The same thing  
> probably applies for postgres, but as I don't use it
> with PHP (only with  
> Python) I can't tell. Look in the docs for
> "persistent connections".
mmm...This is interesting... I see it's usefull but
there are some 'warnings' about use it (see
http://it.php.net/manual/en/features.persistent-connections.php)
:
"Note, however, that this can have some drawbacks if
you are using a database with connection limits that
are exceeded by persistent child connections. If your
database has a limit of 16 simultaneous connections,
and in the course of a busy server session, 17 child
threads attempt to connect, one will not be able to.
If there are bugs in your scripts which do not allow
the connections to shut down (such as infinite loops),
the database with only 16 connections may be rapidly
swamped. Check your database documentation for
information on handling abandoned or idle
connections."

What about it? (i think it's the same with mySQL...)
I don't know how users can connect to... 1, 10,
1000... I must create a pool with 1000 connections? is
this fine? if  connections aren't released I must
reset manually, it is dangerous... do you think?

Thx! Mauro

    
___________________________________ 
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora! 
http://it.messenger.yahoo.it


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Goulet, Dick"
Дата:
Сообщение: Re: [ADMIN] Postgres schema comparison.
Следующее
От: Mauro Bertoli
Дата:
Сообщение: Re: Postgres performance