From: | dan(at)sidhe(dot)org |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | dan(at)sidhe(dot)org,"Robert Haas" <robertmhaas(at)gmail(dot)com>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Trying to track down weird query stalls |
Date: | 2009-03-30 21:07:36 |
Message-ID: | 51413.199.172.169.17.1238447256.squirrel@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
> dan(at)sidhe(dot)org escribió:
>> > dan(at)sidhe(dot)org escribió:
>> >
>> >> where libinstance.libdate <= 1238445044
>> >> and libinstance.enddate > 1238445044
>> >> and libinstance.libinstanceid = libobject.libinstanceid
>> >> and libinstance.architecture = ?
>> >
>> > How are you generating the explain? My bet is that you're just
>> > substituting a literal in the architecture condition, but if the
>> driver
>> > is smart then maybe it's preparating the query beforehand. You'll get
>> a
>> > different plan in that case.
>>
>> I don't think so. Perl's DBI is involved, but the statement's in a
>> variable.
>
> So what's the "?" in the query you pasted earlier?
The first ? (for architecture) is 1, the second ? (for branchid) is 0.
They both should get passed to Postgres as $1 and $2, respectively,
assuming DBD::Pg does its substitution right. (They're both supposed to go
in as placeholders)
-Dan
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-03-30 21:22:39 | Re: Trying to track down weird query stalls |
Previous Message | Alvaro Herrera | 2009-03-30 21:00:22 | Re: Trying to track down weird query stalls |