Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-25 Thread Emrah Mehmedov
On Mon, Jun 24, 2013 at 12:04 PM, Marcin Mańk wrote: > On Mon, Jun 24, 2013 at 11:55 AM, Emrah Mehmedov > wrote: > > Marcin: This heppens everytime when i try to query different keyword in > FTS > > for example: > > > > firsttime: query: "Hello & World" 15sec~ > > secondtime: query: "Hello & Wor

Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-24 Thread Marcin Mańk
On Mon, Jun 24, 2013 at 11:55 AM, Emrah Mehmedov wrote: > 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" 1

Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-24 Thread Emrah Mehmedov
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 fro

Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-23 Thread Marcin Mańk
On Wed, Jun 5, 2013 at 1:15 PM, Emrah Mehmedov 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 a

Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-23 Thread Tom Kincaid
Just rule out something weird; Can you determine if you are getting the same query plan in both cases? Use "explain analyze" from the command line and turn on auto.explain via postgresql.conf to log what the plan is for the php case. Tom Kincaid EnterpriseDB www.enterprisedb.com On Wed, Jun 5

Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-05 Thread Emrah Mehmedov
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. On

Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-05 Thread Bob Jolliffe
Most probably. If your existing connection string specifies something like "host=localhost port=5432 ..." just remove the host and port parameters and php will by default try to connect with unix domain socket. On 5 June 2013 12:02, Emrah Mehmedov wrote: > Can we modify php connection? > > > O

Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-05 Thread Emrah Mehmedov
Can we modify php connection? On Wed, Jun 5, 2013 at 1:01 PM, Bob Jolliffe wrote: > Is php connecting through tcp whilst pgadmin is using unix domain socket? > Probably the query time is the same, but returning the result over tcp > will be slower. > > > On 5 June 2013 11:18, Emrah Mehmedov w

Re: [PERFORM] PHP Postgres query slower then PgAdmin

2013-06-05 Thread Bob Jolliffe
Is php connecting through tcp whilst pgadmin is using unix domain socket? Probably the query time is the same, but returning the result over tcp will be slower. On 5 June 2013 11:18, Emrah Mehmedov wrote: > Hello, > > I'm using php5.4.12 with extension=php_pgsql.dll enabled but the query > tha

[PERFORM] PHP Postgres query slower then PgAdmin

2013-06-05 Thread Emrah Mehmedov
Hello, I'm using php5.4.12 with extension=php_pgsql.dll enabled but the query that i'm trying to execute is faster on PgAdmin app. SELECT title, ts_rank_cd(vector, query) AS rank FROM links, to_tsquery('english', 'risk') query WHERE query @@ vector ORDER BY rank DESC; I'm not sure, what can i do