文档介绍:High Performance SQL Server
Inside the SQL Server
Query Optimizer
Benjamin Nevarez
978-1-906434-57-1
Inside the SQL Server
Query Optimizer
By Benjamin Nevarez
First published by Simple Talk Publishing 2010
Copyright Benjamin Nevarez 2011
ISBN: 978-1-906434-57-1
The right of Benjamin Nevarez to be identified as the author of this work has been asserted by himin
accordance with the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored or introduced into a retrieval
system, or transmitted, in any form, or by any means (electronic, mechanical, photocopying, recording or
otherwise) without the prior written consent of the publisher. Any person who does any unauthorized act in
relation to this publication may be liable to criminal prosecution and civil claims for damages.
This book is sold subject to the condition that it shall not, by way of trade or otherwise, be lent, re-sold,
hired out, or otherwise circulated without the publisher's prior consent in any form other than that in which
it is published and without a similar condition including this condition being imposed on the subsequent
publisher.
Editor: Chris Massey
Technical Review: Grant Fritchey
Cover Image: Andy Martin
Typeset & Designed: Matthew Tye & Gower Associates
Table of Contents
Chapter 1: Introduction to Query Optimization........................... 14
How the Query Optimizer Works........................................................................................ 15
Generating candidate execution plans..........................................................................18
Assessing the cost of each plan...................................................................................... 20
Query execution and plan caching................................................................................ 20
Hinting...............................................................