Re: PHP Postgres query slower then PgAdmin

From: Emrah Mehmedov <emrah(dot)mehmedov(at)x3mlabs(dot)com>
To: Marcin Mańk <marcin(dot)mank(at)gmail(dot)com>
Cc: Bob Jolliffe <bobjolliffe(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: PHP Postgres query slower then PgAdmin
Date: 2013-06-24 09:55:04
Message-ID: CAGRV00+L6eEOmRett4hKMeo6emVuaC9D=wgyVUj7bsrnC1JPBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Marcin: This heppens everytime when i try to query different keyword in FTS
for example:

firsttime: query: "Hello & World" 15sec~
secondtime: query: "Hello & World" 2-3sec

then new query

firsttime: query: "We & are & good" 10sec~
secondtime: query: "We & are & good" 2-3sec

even if i'm going from CMD queries are faster but on first time always it's
slower then rest of the times.

On Sun, Jun 23, 2013 at 9:57 PM, Marcin Mańk <marcin(dot)mank(at)gmail(dot)com> wrote:

> On Wed, Jun 5, 2013 at 1:15 PM, Emrah Mehmedov
> <emrah(dot)mehmedov(at)x3mlabs(dot)com> wrote:
> > [ull text search]
> > I notice something in CMD, first time query is executing same time like
> from
> > php all the time, but on the rest of the time that i will execute the
> query
> > is faster from cmd, php is keeping the same execution time.
> > i also change the connection string (i remove host and port) and nothing
> > changed.
>
> The first query using a text search config loads the dictionaries, so
> it is slower, and that's why the following queries are faster. I think
> your PHP persistent connections don't work too well.
>
> Regards
> Marcin Mańk
>

--
Best regards, Emrah Mehmedov
Software Developer @ X3M Labs
http://www.extreme-labs.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Marcin Mańk 2013-06-24 10:04:57 Re: PHP Postgres query slower then PgAdmin
Previous Message Abhijit Menon-Sen 2013-06-24 04:43:50 Re: [PERFORM] In progress INSERT wrecks plans on table