Unix Technical Forum

RE: [Info-ingres] Re: Logging trace conundrum - what am I missing?

This is a discussion on RE: [Info-ingres] Re: Logging trace conundrum - what am I missing? within the Ingres forums, part of the Database Server Software category; --> At 6:56 PM +1100 3/25/05, Paul White wrote: >After digesting all those embedded parenthesis, I thought I'd go >find ...


Go Back   Unix Technical Forum > Database Server Software > Ingres

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 08:01 PM
Betty & Karl Schendel
 
Posts: n/a
Default RE: [Info-ingres] Re: Logging trace conundrum - what am I missing?

At 6:56 PM +1100 3/25/05, Paul White wrote:
>After digesting all those embedded parenthesis, I thought I'd go
>find out what Marty was talking about. Yes, this query seems to
>writes no entries to the log.
>
>update fred set mary = mary;
>
>Does that mean it doesn't need to do the physical write to the table either?
>I've got a bunch of queries similar to Marty's updating calculated
>fields for reporting purposes. I thought I could save time / IO by
>updating only if the field had the wrong answer in it.
>
>UPDATE fred SET mary = (complicated calculation)
>WHERE (mary <> (complicated calculation)) or (mary is null)
>
>I'm thinking the operation might run better if it didnt have to do
>the calculation twice.


That would depend on how many rows qualify to be updated.
There's a certain amount of work involved in deciding that a row
qualifies for update, materializing the replacement expressions,
and giving the row back to DMF. It's fairly deep down within DMF
that it realizes that the row didn't actually change. Unless
nearly all the rows are going to get that far anyway, you're
probably better off doing the calculation twice to exclude rows
that won't change.

One of my current semi-background projects is improving the performance
of expression evaluation. Just how complicated is this complicated
calculation?

Karl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 08:01 PM
Roy Hann
 
Posts: n/a
Default Re: [Info-ingres] Re: Logging trace conundrum - what am I missing ?

"Betty & Karl Schendel" <schendel@kbcomputer.com> wrote in message
news:mailman.1111750085.29601.info-ingres@cariboulake.com...
> At 6:56 PM +1100 3/25/05, Paul White wrote:
> >After digesting all those embedded parenthesis, I thought I'd go
> >find out what Marty was talking about. Yes, this query seems to
> >writes no entries to the log.
> >
> >update fred set mary = mary;
> >
> >Does that mean it doesn't need to do the physical write to the table

either?
> >I've got a bunch of queries similar to Marty's updating calculated
> >fields for reporting purposes. I thought I could save time / IO by
> >updating only if the field had the wrong answer in it.
> >
> >UPDATE fred SET mary = (complicated calculation)
> >WHERE (mary <> (complicated calculation)) or (mary is null)
> >
> >I'm thinking the operation might run better if it didnt have to do
> >the calculation twice.

>
> That would depend on how many rows qualify to be updated.
> There's a certain amount of work involved in deciding that a row
> qualifies for update, materializing the replacement expressions,
> and giving the row back to DMF. It's fairly deep down within DMF
> that it realizes that the row didn't actually change. Unless
> nearly all the rows are going to get that far anyway, you're
> probably better off doing the calculation twice to exclude rows
> that won't change.
>
> One of my current semi-background projects is improving the performance
> of expression evaluation. Just how complicated is this complicated
> calculation?


I seriously doubt any real application is ever going to benefit from
improving the performance of expression evaluation. Real applications spend
almost all their time doing inter-process and network I/O. The piddly extra
microseconds spent evaluating an expression inside the server in a
less-than-ideal way is completely irrelevant. It's like worrying about the
streamlining of a steam-roller.

But of course if you have expertly-crafted TPC benchmark tests on your mind
(as opposed to real applications) then pay me no heed! :-)

Roy


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 08:01 PM
Betty & Karl Schendel
 
Posts: n/a
Default Re: [Info-ingres] Re: Logging trace conundrum - what am I missing?

At 12:09 PM +0000 3/25/05, Roy Hann wrote:
>"Betty & Karl Schendel" <schendel@kbcomputer.com> wrote in message
>.
> >
>> One of my current semi-background projects is improving the performance
>> of expression evaluation. Just how complicated is this complicated
>> calculation?

>
>I seriously doubt any real application is ever going to benefit from
>improving the performance of expression evaluation. Real applications spend
>almost all their time doing inter-process and network I/O. The piddly extra
>microseconds spent evaluating an expression inside the server in a
>less-than-ideal way is completely irrelevant. It's like worrying about the
>streamlining of a steam-roller.
>
>But of course if you have expertly-crafted TPC benchmark tests on your mind
>(as opposed to real applications) then pay me no heed! :-)


Actually, we've measured real benefits (several percentage points)
on real queries when we've hand simplified some expressions as a test.
Until I saw those numbers, I thought the same thing you did.
Also, we're seeing CPU bottlenecks on machines with serious I/O
capabilities, like massive SATA arrays. Most of that's in the row-
at-a-time stuff in QEF, which is next on the list; but some of it was
in expression evaluation.

I will hasten to add that the queries I'm looking at are handling many
millions of rows in an otherwise optimal manner. You are absolutely
right about the normal, garden variety application, where there are
almost certainly dozens of problems far greater than expression
evaluation.

Karl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com