Validated Cost Models for Sensor Network Queries-2009

21
Validated cost models for sensor network queries Lecturer:ZHU KAI Dongseo University

Transcript of Validated Cost Models for Sensor Network Queries-2009

Page 1: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 1/21

Page 2: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 2/21

Catalog

• Motivation

• Problem

QUERY LANGUAGE AND ALGEBRA• PHYSICAL OPERATORS

• COST MODELS

• VALIDATION STRATEGY

• EXPERIMENTAL RESULTS

• CONCLUSIONS

Page 3: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 3/21

Motivation

• Generating a good execution plan for adeclarative query has long been a centralproblem in data management research

Page 4: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 4/21

Problem

• Starting with the seminal work in System R,there has always been widespread recognitionof the important role that cost estimation models(CEMs) have in query optimization.

• Modern query optimization uses estimationmodels to inform decisions as to which concretealgorithms and auxiliary data structures to use in

evaluating algebraic operations – particularly, inherently expensive ones, such as join

and group-bys

Page 5: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 5/21

INTRODUCTION

• Parallel and distributed query execution

The extension of query technology to datastreams has once more highlighted therelevance of CEMs

Page 6: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 6/21

QUERY LANGUAGE AND ALGEBRA

• SNEEql is a declarative query language forWSNs in- spired by expressive stream querylanguages, particularly CQL.

• In SNEEql, an evaluation episode is determinedby the acquisition of data

 – i.e. setting an acquisition rate sets the rate at whichevaluation episodes occur

Page 7: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 7/21

Page 8: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 8/21

QUERY LANGUAGE AND ALGEBRA - Cont.

• In SNEEql, the only structured type is tuple. Theprimitive collection types in SNEEql are :

 – window

 – stream

Page 9: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 9/21

Page 10: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 10/21

Page 11: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 11/21

PHYSICAL OPERATORS

• The operations in the SNEEql physical algebracan be expressed as concrete algorithms at alevel in which it becomes possible to structurally

derive CEMs for memory, time and energy forthem.

•The methodology with the SP ACQUIRE andTRANSMIT physical operators

Page 12: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 12/21

PHYSICAL OPERATORS - Cont.

• The methodology is as follows:

 – (1) We define, in pseudocode, the processing logic ofan operator that gets executed at an evaluation

episode – (2) We declare, in the pseudocode, the state kept by

the operator to support the processing logic in (1)

 – (3) We fairly directly derive from (2) a CEM for

memory – (4) We derive from the algorithmic structure of the

operator a CEM for dura- tion in the classical way

Page 13: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 13/21

PHYSICAL OPERATORS - Cont.1

 – (5) We derive from the CEM for duration obtainedin (4) a CEM for energy by multiplying each addendin the for- mer by the corresponding unit cost in

energy

Page 14: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 14/21

COST MODELS

• The style of pseudocode used in PHYSICALOPERATORS can be built upon with a view to derivingmemory, duration and energy CEMs for the

corresponding operator.

• Since the pseudocode declares the state kept insupport of its processing logic, deriving a CEM for

memory is tantamount to writing a summation in whicheach addend is the result of applying a primitive likesizeof to each scalar variable and summing the scalarelements in collection variables

Page 15: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 15/21

• The derivation of a CEM for duration is similarlystraightforward. The only additional concernsare:

 – (a) to focus on steps which use processing moreintensively

 – (b) to formulate the expressions that act asmultiplicands on the processing blocks that are

iterated over and that quantify the number of passesin the iteration

Page 16: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 16/21

VALIDATION STRATEGY

• The accuracy of CEMs is a determinant factor inthe quality of the decisions taken by an optimizer

Page 17: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 17/21

Page 18: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 18/21

Page 19: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 19/21

EXPERIMENTAL RESULTS

• The following table show that the validationresults for the memory, duration and energyCEMs for SP_ACQUIRE vary as the number of

sensors and the tuple size vary

Page 20: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 20/21

Page 21: Validated Cost Models for Sensor Network Queries-2009

8/3/2019 Validated Cost Models for Sensor Network Queries-2009

http://slidepdf.com/reader/full/validated-cost-models-for-sensor-network-queries-2009 21/21

CONCLUSIONS

• It describes a methodological approach to thederivation of memory, time and energy CEMs forQEPs intended for execution over WSNs.

• We have shown how the energy CEM is fairlydirectly derivable from the duration CEM alone.Finally, we have shown that the CEMs derived

by our methodology are valid