Re: formatting of SQL sent by PHP to postgres

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: formatting of SQL sent by PHP to postgres
Дата
Msg-id Pine.LNX.4.33.0310300832001.23200-100000@css120.ihs.com
обсуждение исходный текст
Ответ на formatting of SQL sent by PHP to postgres  (Ken Guest <kguest@stockbyte.com>)
Ответы Re: formatting of SQL sent by PHP to postgres
Список pgsql-general
On Thu, 30 Oct 2003, Ken Guest wrote:

> Folks,
> I have a question or two regarding PHP and Postgres on the issue of
> speed:
> 1.    Is the semicolon at the end of SQL superflous when sent to Postgres?
> Should it make much of a difference if I removed it?

Yes, you can get rid of it.  No, it won't make any real difference.

> 2. A lot of SQL issued have white space characters (newlines, tabs and
> spaces) present - does this have any [major] impact on how quick
> postgres gets to execute the SQL and return results?

Other than the very tiny increase in time needed to send the extra blank
spaces across the wire, no, it won't have any real effect on the
performance of the database.

It's far more likely that optimizing your SQL queries will yield the
greatest increase in performance.  Things like replacing "select max(id)
from table" with "select id from table order by id desc limit 1" etc...


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: Automatic auditing suggestion
Следующее
От: Tom Lane
Дата:
Сообщение: Re: slow query performance