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

Matthew Sullivan matthew at sorbs.net
Mon Aug 14 18:52:48 EDT 2006


Jesse Vincent wrote:

>
>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.
>  
>

My apologies - yes I should have got some sleep ... helps to actually 
install the newly build module before checking the live code and getting 
cranky about it.  After actually running the install it looks 
considerably more sane ;-)

/ Mat


More information about the Rt-devel mailing list