Oracle Scratchpad

December 1, 2007

It’s the data!

Filed under: Performance, Tuning — Jonathan Lewis @ 11:36 am UTC Dec 1,2007

I’ve just posted an article on my website that I wrote for “Oracle Scene”, the magazine of the UK Oracle User Group. It is a short discussion about the importance of understanding the data, and what you’re trying to do with it, when you want to pick the most cost-effective way of implementing a task. This link points to a Word rtf file of about 105Kb. (But see comment #1 below – if you’re not using Internet Explorer you may have to ’save as’ rather than just double-clicking on the link).

11 Comments »

  1. Hi Jonathan,

    As an FYI – your web server is not returning the best mime type for RTF files. It’s sending “text/plain” instead of “application/rtf” or even “text/rtf”. People using IE won’t notice the difference (since IE will decide for itself what the file is if the server sends text/plain), but FireFox users who do an “open” instead of “save as” on that link will see gibberish.

    :)

    matthew

    Comment by Matthew — December 2, 2007 @ 3:58 am UTC Dec 2,2007 | Reply

  2. Matthew, thanks for the note. I’ll see if I can do anything about that when I get home.

    Comment by Jonathan Lewis — December 2, 2007 @ 5:04 pm UTC Dec 2,2007 | Reply

  3. Windows Firefox users can right-click on the link and select “Open Link in IE Tab”. (I’m assuming all technically-minded Windows Firefox users have the IETab extension installed.)

    Comment by William Robertson — December 3, 2007 @ 9:54 am UTC Dec 3,2007 | Reply

  4. First, I didn’t have a problem doing Save As from FireFox.

    Second, I was wondering why you provided this as an RTF file instead of publishing as text in your blog? I want to send its link to some peers but would rather not force them to download anything. I’m guessing it’s because you published it in the magazine?

    Lastly, and most importantly, it’s a very nice article and has given me a new way to think about setting up indexes for rarely-used values.

    Comment by Stew — December 3, 2007 @ 5:49 pm UTC Dec 3,2007 | Reply

  5. Comments:

    “Who cares!”

    c/!/?

    “When tiny amounts of CPU are involved, there may be more important concerns that performance.”

    c/that/than

    When looking for the clean, simple, solutions to problems,

    c/simple,/simple

    Once you’ve addressed the critical features of volume and location everything else is just standards, documentation and window-dressing.

    c/location/location,

    He is one of the best-known speakers on the UK Oracle circuit, and is also popular on the international scene.

    c/also/

    After the sentence:

    He specialises in designing, optimising, and trouble-shooting applications that make use of the Oracle database engine.

    there are two redundant spaces.

    ===========================================

    Thanx for the article Joanathan.

    Comment by Brian Tkatch — December 3, 2007 @ 5:59 pm UTC Dec 3,2007 | Reply

  6. Brian Tkatch:

    The trouble with your being so unforgivingly pedantic is that when you make a slip-up, it looks hilarious!

    “Thanx for the article Joanathan

    Comment by Richard — December 6, 2007 @ 11:20 am UTC Dec 6,2007 | Reply

  7. Richard.

    I was trying to be helpful. I love it when people correct my mistakes, and i try to extend that courtesy to others. Being it is an article for publication, i figured it would be appreciated even more.

    As for my mistakes, i’m glad i could cheer up your day. :)

    Comment by Brian Tkatch — December 6, 2007 @ 2:15 pm UTC Dec 6,2007 | Reply

  8. Brian Tkatch:
    “i figured it would be appreciated even more”

    Well, I’m not Jonathan, but maybe it’d be more courteous to send him a private email, rather than splash it on his blog?

    Comment by Richard — December 7, 2007 @ 10:38 am UTC Dec 7,2007 | Reply

  9. Richard:

    Agreed. It would have been better. I’m just used to responding to entries where email isn’t an option, that i did not even think of it here.

    Thanx for pointing it out.

    Comment by Brian Tkatch — December 7, 2007 @ 2:12 pm UTC Dec 7,2007 | Reply

  10. Matthew,
    It’s an RTF because I wrote it to send to a magazine for publication – and I didn’t want to rewrite it for the blog.

    Brian, Richard,
    I’m a big boy, I can cope with corrections – but I was considering a reply of c/Joan/Jon/ ;)

    Comment by Jonathan Lewis — December 7, 2007 @ 7:35 pm UTC Dec 7,2007 | Reply

  11. A comment about the article for a change: in order to utilize the specialized index it is not necessary to define a function. You can as well do

    CREATE INDEX special_idx ON mbr_person (
    CASE
    WHEN mbr_last_nm = ‘DATA’
    OR mbr_last_nm = ‘CORRECTION’
    OR mbr_first_nm = ‘DATE’
    OR mbr_first_nm = ‘CORRECTION’ THEN NULL
    ELSE 1
    END)
    ;

    and then

    select
    a.{list of columns},
    b.{list of columns}
    from
    mbr_system b,
    mbr_person a
    where
    b.deactivate = 0
    and a.person_id = b.person_id
    and a.deactivate = 0
    and CASE
    WHEN mbr_last_nm = ‘DATA’
    OR mbr_last_nm = ‘CORRECTION’
    OR mbr_first_nm = ‘DATE’
    OR mbr_first_nm = ‘CORRECTION’ THEN NULL
    ELSE 1
    END = 1
    ;

    Granted, it does look ugly…

    One could extend this approach even further to include even more criteria but then beauty goes down the drain completely (but performance might go up). Then defining the function is probably the lesser evil.

    Comment by Robert — December 19, 2007 @ 12:42 pm UTC Dec 19,2007 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.