0% found this document useful (0 votes)
12 views

Refactoring Legacy T-SQL for Improved Performance 1st Edition Lisa Bohm download

The document provides information about the book 'Refactoring Legacy T-SQL for Improved Performance' by Lisa Bohm, which focuses on modern practices for optimizing SQL Server applications. It includes details on various topics such as T-SQL triage, database structure, and CRUD objects, along with links to download the book and other related titles. The book is dedicated to Allen White and emphasizes the importance of documentation and performance improvement in SQL Server development.

Uploaded by

oppitzhencks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Refactoring Legacy T-SQL for Improved Performance 1st Edition Lisa Bohm download

The document provides information about the book 'Refactoring Legacy T-SQL for Improved Performance' by Lisa Bohm, which focuses on modern practices for optimizing SQL Server applications. It includes details on various topics such as T-SQL triage, database structure, and CRUD objects, along with links to download the book and other related titles. The book is dedicated to Allen White and emphasizes the importance of documentation and performance improvement in SQL Server development.

Uploaded by

oppitzhencks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Refactoring Legacy T-SQL for Improved

Performance 1st Edition Lisa Bohm pdf download

https://ebookmeta.com/product/refactoring-legacy-t-sql-for-
improved-performance-1st-edition-lisa-bohm/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Smart Technologies for Improved Performance of


Manufacturing Systems and Services 1st Edition Bikash
Chandra Behera

https://ebookmeta.com/product/smart-technologies-for-improved-
performance-of-manufacturing-systems-and-services-1st-edition-
bikash-chandra-behera/

Pro T-SQL 2019: Toward Speed, Scalability, and


Standardization for SQL Server Developers 1st Edition
Elizabeth Noble

https://ebookmeta.com/product/pro-t-sql-2019-toward-speed-
scalability-and-standardization-for-sql-server-developers-1st-
edition-elizabeth-noble/

Legacy The Netherworld Academy 1 1st Edition Lisa


Cardwell

https://ebookmeta.com/product/legacy-the-netherworld-
academy-1-1st-edition-lisa-cardwell/

On Middle Ground A History of the Jews of Baltimore


Eric L. Goldstein

https://ebookmeta.com/product/on-middle-ground-a-history-of-the-
jews-of-baltimore-eric-l-goldstein/
A Dark Matter 1st Edition Doug Johnstone

https://ebookmeta.com/product/a-dark-matter-1st-edition-doug-
johnstone/

Languaging Diversity Volume 3 Language s and Power 1st


Edition Elena Di Giovanni

https://ebookmeta.com/product/languaging-diversity-
volume-3-language-s-and-power-1st-edition-elena-di-giovanni/

The Social Life of Hagiography in the Merovingian


Kingdom Kreiner

https://ebookmeta.com/product/the-social-life-of-hagiography-in-
the-merovingian-kingdom-kreiner/

The School of Hillah and the Formation of Twelver Shi i


Islamic Tradition 1st Edition Aun Hasan Ali

https://ebookmeta.com/product/the-school-of-hillah-and-the-
formation-of-twelver-shi-i-islamic-tradition-1st-edition-aun-
hasan-ali/

Savannah Mafia 1 Cruel Prince 1st Edition M A Lee

https://ebookmeta.com/product/savannah-mafia-1-cruel-prince-1st-
edition-m-a-lee/
Kronos Rising Purgatory A Fast Paced Sci Fi Suspense
Thriller Book 6 in the Kronos Rising series 1st Edition
Max Hawthorne

https://ebookmeta.com/product/kronos-rising-purgatory-a-fast-
paced-sci-fi-suspense-thriller-book-6-in-the-kronos-rising-
series-1st-edition-max-hawthorne/
Refactoring
Legacy T-SQL
for Improved
Performance
Modern Practices for SQL Server
Applications

Lisa Bohm

www.allitebooks.com
Refactoring Legacy T-SQL
for Improved Performance
Modern Practices for
SQL Server Applications

Lisa Bohm

www.allitebooks.com
Refactoring Legacy T-SQL for Improved Performance: Modern Practices for
SQL Server Applications
Lisa Bohm
Chardon, OH, USA

ISBN-13 (pbk): 978-1-4842-5580-3 ISBN-13 (electronic): 978-1-4842-5581-0


https://doi.org/10.1007/978-1-4842-5581-0

Copyright © 2020 by Lisa Bohm


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Jonathan Gennick
Development Editor: Laura Berendson
Coordinating Editor: Jill Balzano
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com,
or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is
Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware
corporation.
For information on translations, please e-mail rights@apress.com, or visit http://www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/9781484255803. For more
detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper

www.allitebooks.com
This book is dedicated to Allen White, who has been my friend as well as
helped me grow into a valued member of the community, and
taught me how important it is to keep giving back and
helping others.

www.allitebooks.com
Table of Contents
About the Author����������������������������������������������������������������������������������������������������� xi

About the Technical Reviewer������������������������������������������������������������������������������� xiii


Acknowledgments���������������������������������������������������������������������������������������������������xv

Introduction�����������������������������������������������������������������������������������������������������������xvii

Part I: Everything Is Slow������������������������������������������������������������������������������� 1


Chapter 1: T-SQL Triage�������������������������������������������������������������������������������������������� 3
Severity of the Situation���������������������������������������������������������������������������������������������������������������� 4
Relative Effort������������������������������������������������������������������������������������������������������������������������������� 4
Problem Areas������������������������������������������������������������������������������������������������������������������������������� 4
STATISTICS IO and Time����������������������������������������������������������������������������������������������������������� 5
Query Window Setup��������������������������������������������������������������������������������������������������������������� 5
Code Tests������������������������������������������������������������������������������������������������������������������������������� 6
Execution Plans��������������������������������������������������������������������������������������������������������������������� 11
Perform Triage if Possible����������������������������������������������������������������������������������������������������������� 14
Is There an Index?����������������������������������������������������������������������������������������������������������������� 14
Risk Level of the Change������������������������������������������������������������������������������������������������������� 17
The Answer to Everything…?����������������������������������������������������������������������������������������������������� 18
Triage Outside of Indexing���������������������������������������������������������������������������������������������������������� 18
If Possible, Queries Should Join on Key Values��������������������������������������������������������������������� 19
SARGability���������������������������������������������������������������������������������������������������������������������������� 19
Summary������������������������������������������������������������������������������������������������������������������������������������ 19

Chapter 2: Documentation�������������������������������������������������������������������������������������� 21
Incorporating Existing Documentation���������������������������������������������������������������������������������������� 21
Functionality Documentation������������������������������������������������������������������������������������������������� 28

www.allitebooks.com
Table of Contents

Statistics Information and Execution Plans�������������������������������������������������������������������������������� 29


Coding (Anti) Patterns����������������������������������������������������������������������������������������������������������������� 29
Number of Calls to Each Database Table������������������������������������������������������������������������������� 30
Datatype Mismatches������������������������������������������������������������������������������������������������������������ 31
Subqueries and Where They’re Located�������������������������������������������������������������������������������� 38
Calculations��������������������������������������������������������������������������������������������������������������������������� 38
Temporary Tables and/or Table Variables������������������������������������������������������������������������������ 40
Loops and/or Cursors������������������������������������������������������������������������������������������������������������ 41
CTEs��������������������������������������������������������������������������������������������������������������������������������������� 42
Join Types������������������������������������������������������������������������������������������������������������������������������ 42
LIKE, NOT LIKE, and NOT IN���������������������������������������������������������������������������������������������������� 43
DISTINCT, TOP, and Other Sorting Operations������������������������������������������������������������������������� 43
Calls to Other User-Defined SQL Objects������������������������������������������������������������������������������� 44
Native SQL Server Functions in a WHERE Clause������������������������������������������������������������������ 44
Indexes���������������������������������������������������������������������������������������������������������������������������������������� 48
Back to Runtime Data������������������������������������������������������������������������������������������������������������ 48
Summary������������������������������������������������������������������������������������������������������������������������������������ 48
Wrapping Up Our Documentation������������������������������������������������������������������������������������������ 48
DailySummaryReportPerMonth: Documentation������������������������������������������������������������������������� 48
Code as of 2019.06.02����������������������������������������������������������������������������������������������������������� 48
Functional Requirements������������������������������������������������������������������������������������������������������ 56
Data Calls������������������������������������������������������������������������������������������������������������������������������ 56
Coding (Anti) Patterns������������������������������������������������������������������������������������������������������������ 57
Indexes���������������������������������������������������������������������������������������������������������������������������������� 59

Part II: Database Structure��������������������������������������������������������������������������� 61


Chapter 3: Database Tables������������������������������������������������������������������������������������ 63
Computed Columns��������������������������������������������������������������������������������������������������������������������� 63
Denormalized Data���������������������������������������������������������������������������������������������������������������������� 63
Datatypes and Field Size������������������������������������������������������������������������������������������������������������� 65
Deprecated Datatypes����������������������������������������������������������������������������������������������������������������� 66

vi
Table of Contents

How Much Data?������������������������������������������������������������������������������������������������������������������������� 66


Data Skew/Cardinality���������������������������������������������������������������������������������������������������������������� 67
Constraints���������������������������������������������������������������������������������������������������������������������������������� 68
Changing Table Definitions���������������������������������������������������������������������������������������������������������� 69
Summary������������������������������������������������������������������������������������������������������������������������������������ 82

Chapter 4: Database Views������������������������������������������������������������������������������������� 83


Nesting���������������������������������������������������������������������������������������������������������������������������������������� 84
Multiple Table Calls���������������������������������������������������������������������������������������������������������������� 95
Additional Pieces for Documentation������������������������������������������������������������������������������������ 97
Know Your Data��������������������������������������������������������������������������������������������������������������������� 97
Functionality Check��������������������������������������������������������������������������������������������������������������������� 99
What Problems Did We Fix?������������������������������������������������������������������������������������������������������ 103
Filtering������������������������������������������������������������������������������������������������������������������������������������� 104
Updating Data Through a View�������������������������������������������������������������������������������������������������� 104
Additional Limitations��������������������������������������������������������������������������������������������������������������� 105
Why Use a View?����������������������������������������������������������������������������������������������������������������������� 105
Summary���������������������������������������������������������������������������������������������������������������������������������� 105

Part III: CRUD Objects��������������������������������������������������������������������������������� 107


Chapter 5: Triggers����������������������������������������������������������������������������������������������� 109
View-Based Triggers����������������������������������������������������������������������������������������������������������������� 109
When Should We Use Triggers?������������������������������������������������������������������������������������������������ 110
Common Issues with Triggers��������������������������������������������������������������������������������������������������� 110
Trigger Recursion���������������������������������������������������������������������������������������������������������������������� 114
Triggers and Multi-record Changes������������������������������������������������������������������������������������������ 119
Testing for Values Changing������������������������������������������������������������������������������������������������������ 123
Limit the Work Your Database Must Do������������������������������������������������������������������������������������� 129
Summary���������������������������������������������������������������������������������������������������������������������������������� 135

vii
Table of Contents

Chapter 6: Stored Procedures������������������������������������������������������������������������������ 137


Temporary Tables vs. Table Variables���������������������������������������������������������������������������������������� 137
The Temporary Table����������������������������������������������������������������������������������������������������������� 138
The Table Variable���������������������������������������������������������������������������������������������������������������� 138
Loops���������������������������������������������������������������������������������������������������������������������������������������� 139
Functionality Review����������������������������������������������������������������������������������������������������������������� 139
Start with the Simplest Data����������������������������������������������������������������������������������������������������� 139
Add More Data in Small, Easily Testable Increments����������������������������������������������������������� 142
Windowing Functions���������������������������������������������������������������������������������������������������������������� 144
Avoiding Row or Data Duplicates���������������������������������������������������������������������������������������������� 146
How Did We Get Here Again?���������������������������������������������������������������������������������������������������� 151
But What About Performance?�������������������������������������������������������������������������������������������������� 153
No Missing Rows – Tally Tables!����������������������������������������������������������������������������������������������� 171
What Else Should We Watch For?��������������������������������������������������������������������������������������������� 177
GetUserInfoByName: Documentation���������������������������������������������������������������������������������������� 177
Code as of 2019.07.07��������������������������������������������������������������������������������������������������������� 177
Functional Requirements���������������������������������������������������������������������������������������������������� 179
Data Calls���������������������������������������������������������������������������������������������������������������������������� 179
Possible Red Flags�������������������������������������������������������������������������������������������������������������� 180
Run Statistics for This Call�������������������������������������������������������������������������������������������������������� 181
Functions and STATISTICS IO Output����������������������������������������������������������������������������������������� 182
Coming Up with a Plan of Action����������������������������������������������������������������������������������������������� 183
Go Away, Subqueries!���������������������������������������������������������������������������������������������������������� 183
Remove the Function!��������������������������������������������������������������������������������������������������������� 185
Remove the Leading % in Our LIKE Statement�������������������������������������������������������������������� 186
Summary���������������������������������������������������������������������������������������������������������������������������������� 190

Chapter 7: Functions�������������������������������������������������������������������������������������������� 191


Scalar Functions����������������������������������������������������������������������������������������������������������������������� 191
Viewing STATISTICS IO Caused by Functions���������������������������������������������������������������������������� 193
Scalar-Valued Functions in a WHERE Clause���������������������������������������������������������������������������� 199

viii
Table of Contents

Native SQL Server Functions���������������������������������������������������������������������������������������������������� 200


The Dreaded “Massive Business Logic” Function�������������������������������������������������������������������� 203
Using OUTER APPLY to Join Aggregate Data����������������������������������������������������������������������������� 211
Metrics with Increasing Number of Return Rows���������������������������������������������������������������� 213
Table Valued Functions (TVFs)��������������������������������������������������������������������������������������������������� 215
Summary���������������������������������������������������������������������������������������������������������������������������������� 218

Part IV: The Bad and the Ugly��������������������������������������������������������������������� 219


Chapter 8: Agent Jobs������������������������������������������������������������������������������������������ 221
What Agent Jobs Should Be Doing�������������������������������������������������������������������������������������������� 221
Good Job(s)!������������������������������������������������������������������������������������������������������������������������ 221
When Should I Run Jobs?���������������������������������������������������������������������������������������������������� 222
Common Issues with Agent Jobs���������������������������������������������������������������������������������������������� 224
Overlap�������������������������������������������������������������������������������������������������������������������������������� 224
Summary���������������������������������������������������������������������������������������������������������������������������������� 226

Chapter 9: External Influences����������������������������������������������������������������������������� 227


Linked Servers�������������������������������������������������������������������������������������������������������������������������� 227
Security������������������������������������������������������������������������������������������������������������������������������� 227
Queries Joining Tables from Different Databases��������������������������������������������������������������� 228
Network IO��������������������������������������������������������������������������������������������������������������������������� 228
How Can We Fix This?��������������������������������������������������������������������������������������������������������� 229
SQL Code Calls in the Application��������������������������������������������������������������������������������������������� 229
So What’s the Problem?������������������������������������������������������������������������������������������������������ 229
Dynamic SQL����������������������������������������������������������������������������������������������������������������������� 231
Summary���������������������������������������������������������������������������������������������������������������������������������� 231

Index��������������������������������������������������������������������������������������������������������������������� 233

ix
About the Author
Lisa Bohm leads a team of database administrators (DBAs)
for a software development company. Her history with
legacy database code began early in her career with a
summer project to rewrite the chemical inventory database
for the research division of a local VA hospital. From
there, she went on to building front-end web applications.
When the web calls timed out, Lisa dug in to learn what
databases can do. She has since transitioned into database
administration, inheriting and improving legacy applications
along the way. Her personal focus remains on solid database
architecture and writing well-performing T-SQL.  

xi
About the Technical Reviewer
Kathi Kellenberger is a data platform MVP and the editor of Simple Talk at Redgate
Software. She has worked with SQL Server for over 20 years. She is also coleader of the
PASS Women in Technology Virtual Group and an instructor at LaunchCode. In her
spare time, Kathi enjoys spending time with family and friends, singing, and cycling.

xiii
Acknowledgments
I would like to thank all of the people who believed in me, encouraged, and pushed me
to continue to grow and learn. Special thanks go to Mindy Curnutt, Eric Blinn, and Tim
Tarbet, who showed me how amazing someone can be at the job they choose to do, and
believed that I could be that good too.
I cannot leave out the people who work for me. I lead a wonderful team of involved
people who are active in their continued learning, and continue to inspire me every day
by finding solutions to really difficult problems.
Also thank you to my family (including my #sqlfamily) who have always been
supportive, loving, and unstinting of hugs and moral support when needed!

xv
Introduction
What is legacy code? There are a few definitions floating around out there, but as a
working definition, we’re going to use the following:
Legacy code is code that is no longer being actively supported by the people who
wrote it.
Why are we going to use that? In software development, good documentation goes a
long way. Developers should understand what code is trying to accomplish and how it’s
trying to do so. When documentation either doesn’t exist or isn’t as thorough as required
and the original programmers aren’t available if you need to know why something was
written a particular way, it can be a nightmare to fix. In some cases, it may not even
be clear whether code ever worked as intended, or if the functionality of the change
someone is requesting is within the original intent of the programmer(s).

A Tale of Woe
How does legacy code start? Let’s look at this story. Code is written to solve a problem –
for example, someone is copying data into Excel every day and doing some hand
manipulation to generate a graph to add to a larger report. A developer sets up a quick
application to pull the data from the database and export it into Excel automatically for
the user, also performing the calculations the user was doing by hand.
This user then trains their successor and another person in the department on how
to view this report. One of them says, “Hey, this is great! Can you also make it pull data
for this other report and we can show how these numbers reflect against each other?”
Someone else loves the additional functionality but needs the code to work in a different
way, or do different statistical calculations, or needs to add an additional field on the
report. That person’s manager is intrigued by the functionality and wants a weekly
summary report to review. Code structure starts to resemble something that is cobbled
together, as multiple developers add bits of functionality over time. Oftentimes, there
is little to no documentation on the functionality or the choice of code – everyone just
adds a bunch of lines at the end of the code to handle the small part they were asked to
develop.

xvii
Introduction

Many times, front-end developers don’t specialize in T-SQL, so do not usually have
a deep understanding of the SQL Server optimizer. Especially in the case of “let’s just
add lines of code to the bottom of this to handle additional functionality,” calls to the
database can increase exponentially; in many cases, calls grab the same data over and
over. And, oh, by now, over half the company is using this app in one way or another – or
perhaps three ways. The vast majority of these uses, by the way, were never intended by
anyone who had ever touched the code.
Users complain about slowness and performance. Even more frustrating, all of the
other business-critical applications that use the same database(s) become slower and
slower as they fight for resources and locks with the application and its chatty data calls.
Also, of course, every developer that has ever touched this application has moved on or
has been promoted and hasn’t looked at code for years, so has no recollection of ever
manipulating any code even remotely similar to this patched-together behemoth that is
rampaging through the company infrastructure.

Congratulations!
You have inherited one of these types of applications, or you probably wouldn’t be
here reading this book. Although there will be (possibly many) times that you may
want to cry, yell, or swear, this will also give you some unparalleled opportunities to be
a hero and pull off some very spectacular-seeming fixes. Just remember, though, that
when you really fix something amazing, most people will be completely oblivious to
that fact. Then, when you do something you think is so obvious that a worm out there
on the sidewalk could probably manage it, you may get so many congratulations and
thanks that you’ll wonder if you really did something magical. That is probably more
of a general life/job observation and not related specifically to legacy code, but it’s also
prevalent here.

What This Book Is


This book is meant to help you, the reader, step in and identify potential issues in a
specific database object relatively quickly. There are a few assumptions that go with this:

1. Hardware/hardware configuration/VM configuration has been


ruled out as the performance problem.

xviii
Introduction

2. External sources have been ruled out as the problem (although we


all know it’s really the network…).

3. The database objects that are causing concern have been


identified.

We are going to continue on from the point of “Okay, this has been identified as an
issue. Now what do I do with it?” Most of what we’ll be doing is actually looking at the
code with the help of a few performance measures and learning about best practices to
help identify problem areas. You should be familiar with basic T-SQL coding syntax and
techniques and how to do a bit more advanced querying.
We will cover most of the issues commonly seen by object type, as well as a couple
of less common problems just for fun. Once these problem areas within the object are
identified, you can then mitigate the performance issues with relatively low effort and
cost. Some objects may require a much deeper dive. Once we’ve done some triage to
help alleviate the immediate pain an object is causing, we will cover what is involved in
effectively performing the deeper dive.
We also will talk about how to quickly tell if you’re on the right track in terms of the
fixes you want to apply. We’ll go over some simple (and free) tools that can be used to
measure performance, so you can document the before/after metrics to go along with
the rest of the documentation you’re going to be sure to add so the next poor sod
(I mean the next person) who has to maintain this system will have an easier time of it!

What This Book Is Not


Magic. This book is not magic, although at times it might seem like it helps you perform
some. Seriously though, there are times when things are so bad that you cannot fix them.
This is pretty rare, and either myself or one of the members of my various teams has
almost always managed to “just fix it,” but just be aware that it is possible that something
is unsalvageable. Even better, your boss should also be aware of this and have your back
should you run into that situation. If you are not that fortunate, you may want to consider
finding another job, but that is probably outside the scope of this book.

xix
Another Random Scribd Document
with Unrelated Content
The Project Gutenberg eBook of Index of the
Project Gutenberg Works of Anthony Trollope
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: Index of the Project Gutenberg Works of Anthony Trollope

Author: Anthony Trollope

Editor: David Widger

Release date: November 30, 2018 [eBook #58383]


Most recently updated: April 8, 2024

Language: English

Credits: Produced by David Widger

*** START OF THE PROJECT GUTENBERG EBOOK INDEX OF THE


PROJECT GUTENBERG WORKS OF ANTHONY TROLLOPE ***
INDEX OF THE PROJECT
GUTENBERG
WORKS OF

ANTHONY TROLLOPE

Compiled by David Widger


This Index of Project Gutenberg's collection of the
works of Anthony Trollope is dedicated (without his
permission) to Dr. Joseph Loewenstein whose many
productions of the major works of Trollope are the
high points of the collection. DW
CONTENTS
Click on the ## before many of the titles to
view a linked
table of contents for that volume.

Click on the title itself to open the original


online file.

## THE WARDEN

## HUNTING SKETCHES

## NORTH AMERICA, VOLUME I

## NORTH AMERICA, VOLUME II

## THE PRIME MINISTER

## FRAMLEY PARSONAGE

## THE LAST CHRONICLE OF BARSET

## DOCTOR THORNE

## BARCHESTER TOWERS
## THE DUKE'S CHILDREN

## THE SMALL HOUSE AT ALLINGTON

## THE KELLYS AND THE O'KELLYS

## THE BELTON ESTATE

## THE AMERICAN SENATOR

## HE KNEW HE WAS RIGHT

## THE WAY WE LIVE NOW

## HARRY HEATHCOTE OF GANGOIL

## LA VENDEE

## CASTLE RICHMOND

## AN AUTOBIOGRAPHY

## THE EUSTACE DIAMONDS

## THE THREE CLERKS

NINA BALATKA

## LIFE OF CICERO, Vol I

## THE LIFE OF CICERO, Vol 2


## JOHN CALDIGATE

## MR. SCARBOROUGH'S FAMILY

## THE CLAVERINGS

## AN EYE FOR AN EYE

## PHINEAS FINN

## PHINEAS REDUX

## THACKERAY

## CAN YOU FORGIVE HER

## DR. WORTLE'S SCHOOL

## KEPT IN THE DARK

## ORLEY FARM

## MISS MACKENZIE

## COUSIN HENRY

## AN OLD MAN'S LOVE

## RALPH THE HEIR


## THE BERTRAMS, complete

## LINDA TRESSEL

## THE VICAR OF BULLHAMPTON

## THE FIXED PERIOD

## STRUGGLES OF BROWN, JONES, AND ROBINSON

## SIR HARRY HOTSPUR OF HUMBLETHWAITE

## THE MACDERMOTS OF BALLYCLORAN

## MARION FAY, complete

## THE LANDLEAGUERS, complete

## LADY ANNA, complete

## AYALA'S ANGEL, complete

## RACHEL RAY, complete

## TRAVELLING SKETCHES

## LOTTA SCHMIDT and OTHER STORIES

## MARY GRESLEY and AN EDITOR'S TALES

## THE WEST INDIES AND THE SPANISH MAIN


## TALES OF ALL COUNTRIES

## WHY FRAU FROHMANN RAISED HER PRICES

## LORD PALMERSTON

## THE CHURCH OF ENGLAND

## THE COMMENTARIES OF CAESAR

## CHRISTMAS AT THOMPSON HAL

THE EBOOKS BELOW DO NOT HAVE LINKED TABLES OF


CONTENTS!!

LA MERE BAUCHE

JOHN BULL ON THE GUADALQUIVIR

THE O'CONORS OF CASTLE CONOR

MISS SARAH JACK, OF SPANISH TOWN

THE COURTSHIP OF SUSAN BELL

AN UNPROTECTED FEMALE AT THE PYRAMIDS

THE CHATEAU OF PRINCE POLIGNAC

AARON TROW

MRS. GENERAL TALBOYS


THE PARSON'S DAUGHTER OF OXNEY

THE MISTLETOE BOUGH

GEORGE WALKER AT SUEZ

RETURNING HOME

A RIDE ACROSS PALESTINE

HOUSE OF HEINE BROTHERS, IN MUNICH

THE MAN WHO KEPT HIS MONEY IN A BOX

THE GOLDEN LION OF GRANPERE

TABLES OF CONTENTS OF
VOLUMES
THE WARDEN
By Antony Trollope

CONTENTS

I. Hiram's Hospital
II. The Barchester Reformer
III. The Bishop of Barchester
IV. Hiram's Bedesmen
V. Dr Grantly Visits the Hospital
VI. The Warden's Tea Party
VII. The Jupiter
VIII. Plumstead Episcopi
IX. The Conference
X. Tribulation
XI. Iphigenia
XII. Mr Bold's Visit to Plumstead
XIII. The Warden's Decision
XIV. Mount Olympus
XV. Tom Towers, Dr Anticant, and Mr Sentiment
XVI. A Long Day in London
XVII. Sir Abraham Haphazard
XVIII. The Warden Is Very Obstinate
XIX. The Warden Resigns
XX. Farewell
XXI. Conclusion

HUNTING SKETCHES
by Anthony Trollope

CONTENTS

THE MAN WHO HUNTS AND DOESN'T LIKE IT.


THE MAN WHO HUNTS AND DOES LIKE IT.
THE LADY WHO RIDES TO HOUNDS.
THE HUNTING FARMER.
THE MAN WHO HUNTS AND NEVER JUMPS.
THE HUNTING PARSON.
THE MASTER OF HOUNDS.
HOW TO RIDE TO HOUNDS

NORTH AMERICA
By Anthony Trollope
In Two Volumes

Vol. I

CONTENTS

I. INTRODUCTION.
II. NEWPORT—RHODE ISLAND.
III. MAINE, NEW HAMPSHIRE, AND VERMONT.
IV. LOWER CANADA.
V. UPPER CANADA.
VI. THE CONNEXION OF THE CANADAS
WITH GREAT BRITAIN.
VII. NIAGARA.
VIII. NORTH AND WEST.
IX. FROM NIAGARA TO THE MISSISSIPPI.
X. THE UPPER MISSISSIPPI.
XI. CERES AMERICANA.
XII. BUFFALO TO NEW YORK.
XIII. AN APOLOGY FOR THE WAR.
XIV. NEW YORK.
XV. THE CONSTITUTION OF THE
STATE OF NEW YORK.
XVI. BOSTON.
XVII. CAMBRIDGE AND LOWELL.
XVIII. THE RIGHTS OF WOMEN.
XIX. EDUCATION AND RELIGION.
XX. FROM BOSTON TO WASHINGTON.

NORTH AMERICA
By Anthony Trollope
In Two Volumes

Vol. II

CONTENTS

I. WASHINGTON.
II. CONGRESS.
III. THE CAUSES OF THE WAR.
IV. WASHINGTON TO ST. LOUIS.
V. MISSOURI.
VI. CAIRO AND CAMP WOOD.
VII. THE ARMY OF THE NORTH.
VIII. BACK TO BOSTON.
IX. THE CONSTITUTION OF
THE UNITED STATES.
X. THE GOVERNMENT.
XI. THE LAW COURTS AND LAWYERS
OF THE UNITED STATES.
XII. THE FINANCIAL POSITION.
XIII. THE POST-OFFICE.
XIV. AMERICAN HOTELS.
XV. LITERATURE.
XVI. CONCLUSION.
APPENDIX A. DECLARATION OF
INDEPENDENCE.
APPENDIX B. ARTICLES OF
CONFEDERATION, ETC.
APPENDIX C. CONSTITUTION OF
THE UNITED STATES.

THE PRIME MINISTER


By Anthony Trollope
First published in monthly installments in 1875 and 1876
and in book form in 1876

CONTENTS

Volume I

I. Ferdinand Lopez
II. Everett Wharton
III. Mr. Abel Wharton, Q.C.
IV. Mrs. Roby
V. "No One Knows Anything About Him"
VI. An Old Friend Goes to Windsor
VII. Another Old Friend
VIII. The Beginning of a New Career
IX. Mrs. Dick's Dinner Party.—No. I
X. Mrs. Dick's Dinner Party.—No. II
XI. Carlton Terrace
XII. The Gathering of Clouds
XIII. Mr. Wharton Complains
XIV. A Lover's Perseverance
XV. Arthur Fletcher
XVI. Never Run Away!
XVII. Good-Bye
XVIII. The Duke of Omnium Thinks of Himself
XIX. Vulgarity
XX. Sir Orlando's Policy
XXI. The Duchess's New Swan
XXII. St. James's Park
XXIII. Surrender
XXIV. The Marriage
XXV. The Beginning of the Honeymoon
XXVI. The End of the Honeymoon
XXVII. The Duke's Misery
XXVIII. The Duchess Is Much Troubled
XXIX. The Two Candidates for Silverbridge
XXX. "Yes;—a Lie!"
XXXI. "Yes;—with a Horsewhip in My Hand"
XXXII. "What Business Is It of Yours?"
XXXIII. Showing That a Man Should Not Howl
XXXIV. The Silverbridge Election
XXXV. Lopez Back in London
XXXVI. The Jolly Blackbird
XXXVII. The Horns
XXXVIII. Sir Orlando Retires
XXXIX. "Get Round Him"
XL. "Come and Try It"

Volume II

XLI. The Value of a Thick Skin


XLII. Retribution
XLIII. Kauri Gum
XLIV. Mr. Wharton Intends to Make a New Will
XLV. Mrs. Sexty Parker
XLVI. "He Wants to Get Rich Too Quick"
XLVII. As for Love!
XLVIII. "Has He Ill-treated You?"
XLIX. "Where Is Guatemala?"
L. Mr. Slide's Revenge
LI. Coddling the Prime Minister
LII. "I Can Sleep Here To-night, I Suppose?"
LIII. Mr. Hartlepod
LIV. Lizzie
LV. Mrs. Parker's Sorrows
LVI. What the Duchess Thought of Her Husband
LVII. The Explanation
LVIII. "Quite Settled"
LIX. "The First and the Last"
LX. The Tenway Junction
LXI. The Widow and Her Friends
LXII. Phineas Finn Has a Book to Read
LXIII. The Duchess and Her Friend
LXIV. The New K.G.
LXV. "There Must Be Time"
LXVI. The End of the Session
LXVII. Mrs. Lopez Prepares to Move
LXVIII. The Prime Minister's Political Creed
LXIX. Mrs. Parker's Fate
LXX. At Wharton
LXXI. The Ladies at Longbarns Doubt
LXXII. "He Thinks That Our Days Are Numbered"
LXXIII. Only the Duke of Omnium
LXXIV. "I Am Disgraced and Shamed"
LXXV. The Great Wharton Alliance
LXXVI. Who Will It Be?
LXXVII. The Duchess in Manchester Square
LXXVIII. The New Ministry
LXXIX. The Wharton Wedding
LXXX. The Last Meeting at Matching

FRAMLEY PARSONAGE
By Anthony Trollope

CONTENTS

I. "OMNES OMNIA BONA DICERE."


II. THE FRAMLEY SET, AND THE CHALDICOTES SET.
III. CHALDICOTES.
IV. A MATTER OF CONSCIENCE.
V. AMANTIUM IRÆ AMORIS INTEGRATIO.
VI. MR. HAROLD SMITH'S LECTURE.
VII. SUNDAY MORNING.
VIII. GATHERUM CASTLE.
IX. THE VICAR'S RETURN.
X. LUCY ROBARTS.
XI. GRISELDA GRANTLY.
XII. THE LITTLE BILL.
XIII. DELICATE HINTS.
XIV. MR. CRAWLEY OF HOGGLESTOCK.
XV. LADY LUFTON'S AMBASSADOR.
XVI. MRS. PODGENS' BABY.
XVII. MRS. PROUDIE'S CONVERSAZIONE.
XVIII. THE NEW MINISTER'S PATRONAGE.
XIX. MONEY DEALINGS.
XX. HAROLD SMITH IN THE CABINET.
XXI. WHY PUCK, THE PONY, WAS BEATEN.
XXII. HOGGLESTOCK PARSONAGE.
XXIII. THE TRIUMPH OF THE GIANTS.
XXIV. MAGNA EST VERITAS.
XXV. NON-IMPULSIVE.
XXVI. IMPULSIVE.
XXVII. SOUTH AUDLEY STREET.
XXVIII. DR. THORNE.
XXIX. MISS DUNSTABLE AT HOME.
XXX. THE GRANTLY TRIUMPH.
XXXI. SALMON FISHING IN NORWAY.
XXXII. THE GOAT AND COMPASSES.
XXXIII. CONSOLATION.
XXXIV. LADY LUFTON IS TAKEN BY SURPRISE.
XXXV. THE STORY OF KING COPHETUA.
XXXVI. KIDNAPPING AT HOGGLESTOCK.
XXXVII. MR. SOWERBY WITHOUT COMPANY.
XXXVIII. IS THERE CAUSE OR JUST IMPEDIMENT?
XXXIX. HOW TO WRITE A LOVE LETTER.
XL. INTERNECINE.
XLI. DON QUIXOTE.
XLII. TOUCHING PITCH.
XLIII. IS SHE NOT INSIGNIFICANT?
XLIV. THE PHILISTINES AT THE PARSONAGE.
XLV. PALACE BLESSINGS.
XLVI. LADY LUFTON'S REQUEST.
XLVII. NEMESIS.
XLVIII. HOW THEY WERE ALL MARRIED, HAD TWO
CHILDREN, AND LIVED HAPPY EVER AFTER.
ILLUSTRATIONS

LORD LUFTON AND LUCY ROBARTS. CHAPTER XI.


"WAS IT NOT A LIE?" CHAPTER XVI.
THE CRAWLEY FAMILY. CHAPTER XXII.
LADY LUFTON AND THE DUKE OF OMNIUM. CHAPTER XXIX.
MRS. GRESHAM AND MISS DUNSTABLE. CHAPTER XXXVIII.
"MARK," SHE SAID, "THE MEN ARE HERE." CHAPTER XLIV.

THE LAST CHRONICLE


OF BARSET
By Anthony Trollope
First published in monthly installments
from December 1, 1866, to July 6, 1867,
and in book form in 1867

CONTENTS

I. How Did He Get It?


II. By Heavens He Had Better Not!
III. The Archdeacon's Threat.
IV. The Clergyman's House at Hogglestock.
V. What the World Thought About It.
VI. Grace Crawley.
VII. Miss Prettyman's Private Room.
VIII. Mr. Crawley Is Taken to Silverbridge.
IX. Grace Crawley Goes to Allington.
X. Dinner at Framley Court.
XI. The Bishop Sends His Inhibition.
XII. Mr. Crawley Seeks for Sympathy.
XIII. The Bishop's Angel.
XIV. Major Grantly Consults a Friend.
XV. Up in London.
XVI. Down at Allington.
XVII. Mr. Crawley Is Summoned to Barchester.

You might also like