tuning case study from a travel application

tuning case study from a travel application - Tuning in...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Tuning in Action Dennis Shasha
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Application Context Each record, when inserted, undergoes several tests to see where and how it should be inserted. Programmer temptation is to treat each record separately and in a loop.
Background image of page 2
Starting Point Input relation consisting of records to be inserted, alloc (id, extra_price, otherfields) Stored procedure selects rows of alloc into local scalar variables in a loop and then processes each one based on conditions. The record itself may be involved in interior loops.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example Suppose that extra_price is a scalar variable in the stored procedure derived from alloc.extra_price We have an insert applying to each row of alloc of the form: if (extra_price > 0) then insert T select R.x, R.y from R, S where R.A = S.B and R.C = extra_price
Background image of page 4
If statement can be translated to where clause so one statement can do everything. Insert T
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/06/2011 for the course CS 2434 taught by Professor Shasha during the Spring '11 term at NYU.

Page1 / 11

tuning case study from a travel application - Tuning in...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online