[Rt-devel] Postgres performance issues and some "odd" ways to get IDs...

Jesse Vincent jesse at bestpractical.com
Mon Aug 14 12:30:14 EDT 2006




On Tue, Aug 15, 2006 at 01:24:30AM +1000, Matthew Sullivan wrote:
> Hey All,
> 
> the only slow queries... needless to say I was surprised when I saw what 
> it was doing (eg: SELECT id from Transactions where oid = <blah>;) ... 
> further inspection lead me to DBIx::SearchBuilder::Handle::Pg::Insert() 
> ... and the following:

Why don't you try upgrading DBIx::SearchBuilder:

http://search.cpan.org/src/JESSE/DBIx-SearchBuilder-1.43/SearchBuilder/Handle/Pg.pm
> 
> sub Insert {
...
>    my $sql = "SELECT id FROM $table WHERE oid = ?";
>    my @row = $self->FetchResult($sql, $oid);
>    # TODO: Propagate Class::ReturnValue up here.
> 
> Comments/flames welcome...
> 
> Regards,
> 
> Mat
> 
> PS: It's 1:15am here after 6 hours of database performance debugging, 
> apologies if the above offends, it is not meant to.
> 

But maybe only after you get a bit of rest. Best luck. Please tell us if
this helps.

Jesse


More information about the Rt-devel mailing list