100% found this document useful (2 votes)
15 views

(Ebook) PostgreSQL Query Optimization by anna pdf download

The document provides information about various ebooks related to PostgreSQL query optimization, including titles, authors, and ISBNs. It highlights the availability of digital formats for instant download and offers insights into the content of the 'PostgreSQL Query Optimization: The Ultimate Guide to Building Efficient Queries' book. Additionally, it includes details about PostgreSQL documentation and other related resources.

Uploaded by

hezozaq5890
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
100% found this document useful (2 votes)
15 views

(Ebook) PostgreSQL Query Optimization by anna pdf download

The document provides information about various ebooks related to PostgreSQL query optimization, including titles, authors, and ISBNs. It highlights the availability of digital formats for instant download and offers insights into the content of the 'PostgreSQL Query Optimization: The Ultimate Guide to Building Efficient Queries' book. Additionally, it includes details about PostgreSQL documentation and other related resources.

Uploaded by

hezozaq5890
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/ 84

(Ebook) PostgreSQL Query Optimization by anna

download

https://ebooknice.com/product/postgresql-query-
optimization-54823126

Download more ebook instantly today at https://ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) PostgreSQL Query Optimization by Henrietta Dombrovskaya; Boris Novikov; Anna


Bailliekova ISBN 9781484268841, 9781484268858, 1484268849, 1484268857

https://ebooknice.com/product/postgresql-query-optimization-33447374

ebooknice.com

(Ebook) PostgreSQL Query Optimization: The Ultimate Guide to Building Efficient


Queries by Henrietta Dombrovskaya, Boris Novikov, Anna Bailliekova ISBN
9781484268841, 1484268849

https://ebooknice.com/product/postgresql-query-optimization-the-ultimate-guide-
to-building-efficient-queries-24506964

ebooknice.com

(Ebook) PostgreSQL Query Optimization: The Ultimate Guide to Building Efficient


Queries by Henrietta Dombrovskaya, Boris Novikov, Anna Bailliekova ISBN
9798868800696, 8868800691

https://ebooknice.com/product/postgresql-query-optimization-the-ultimate-guide-
to-building-efficient-queries-55507510

ebooknice.com

(Ebook) PostgreSQL Query Optimization: The Ultimate Guide to Building Efficient


Queries by Dombrovskaya, Henrietta ISBN 9781484268858, 9781484268841, 9781484264287,
1484264282, 1484268857, 1484268849

https://ebooknice.com/product/postgresql-query-optimization-the-ultimate-guide-
to-building-efficient-queries-33638486

ebooknice.com
(Ebook) PostgreSQL 16.0 Documentation. by The PostgreSQL Global Development Group.

https://ebooknice.com/product/postgresql-16-0-documentation-53006874

ebooknice.com

(Ebook) PostgreSQL 15.4 Documentation by The PostgreSQL Global Development Group

https://ebooknice.com/product/postgresql-15-4-documentation-53006880

ebooknice.com

(Ebook) PostgreSQL 15.5 Documentation by The PostgreSQL Global Development Group

https://ebooknice.com/product/postgresql-15-5-documentation-54067610

ebooknice.com

(Ebook) PostgreSQL 16.1 Documentation by The PostgreSQL Global Development Group

https://ebooknice.com/product/postgresql-16-1-documentation-54067614

ebooknice.com

(Ebook) SQL Server 2022 Query Performance Tuning: Troubleshoot and Optimize Query
Performance Sixth Edition by Grant Fritchey ISBN 9781484288900, 1484288904

https://ebooknice.com/product/sql-server-2022-query-performance-tuning-
troubleshoot-and-optimize-query-performance-sixth-edition-47215678

ebooknice.com
PostgreSQL Query
Optimization
The Ultimate Guide to Building
Efficient Queries
Second Edition

Henrietta Dombrovskaya
Boris Novikov
Anna Bailliekova
PostgreSQL Query Optimization: The Ultimate Guide to Building Efficient Queries,
Second Edition
Henrietta Dombrovskaya Boris Novikov
DRW Holdings, Chicago, IL, USA Database expert, Helsinki, Finland
Anna Bailliekova
UrbanFootprint, Milwaukee, Wisconsin, USA

ISBN-13 (pbk): 979-8-8688-0068-9 ISBN-13 (electronic): 979-8-8688-0069-6


https://doi.org/10.1007/979-8-8688-0069-6

Copyright © 2024 by Henrietta Dombrovskaya, Boris Novikov, Anna Bailliekova


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: Shaul Elson
Development Editor: Laura Berendson
Project Manager: Jessica Vakili
Cover designed by Straive
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza,
Suite 4600, New York, NY 10004-1562, USA. 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 [email protected]; for reprint,
paperback, or audio rights, please e-mail [email protected].
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. For more detailed information, please visit https://www.apress.com/gp/services/
source-code.
Paper in this product is recyclable
Table of Contents
About the Authors�������������������������������������������������������������������������������������������������� xiii

About the Technical Reviewer���������������������������������������������������������������������������������xv


Acknowledgments�������������������������������������������������������������������������������������������������xvii

Introduction������������������������������������������������������������������������������������������������������������xix

Chapter 1: Why Optimize?���������������������������������������������������������������������������������������� 1


What Do We Mean by Optimization?��������������������������������������������������������������������������������������������� 1
Why It Is Difficult: Imperative and Declarative������������������������������������������������������������������������������ 2
Optimization Goals������������������������������������������������������������������������������������������������������������������������ 6
Optimizing Processes�������������������������������������������������������������������������������������������������������������������� 7
Optimizing OLTP and OLAP������������������������������������������������������������������������������������������������������ 8
Database Design and Performance����������������������������������������������������������������������������������������� 9
Application Development and Performance�������������������������������������������������������������������������� 11
Other Stages of the Lifecycle������������������������������������������������������������������������������������������������ 11
PostgreSQL Specifics������������������������������������������������������������������������������������������������������������������ 12
Summary������������������������������������������������������������������������������������������������������������������������������������ 13

Chapter 2: Theory: Yes, We Need It!������������������������������������������������������������������������ 15


Query Processing Overview�������������������������������������������������������������������������������������������������������� 15
Compilation��������������������������������������������������������������������������������������������������������������������������� 15
Optimization and Execution��������������������������������������������������������������������������������������������������� 16
Relational, Logical, and Physical Operations������������������������������������������������������������������������������ 17
Relational Operations������������������������������������������������������������������������������������������������������������ 17
Logical Operations����������������������������������������������������������������������������������������������������������������� 21
Queries as Expressions: Thinking in Sets������������������������������������������������������������������������������ 22
Operations and Algorithms���������������������������������������������������������������������������������������������������� 23
Summary������������������������������������������������������������������������������������������������������������������������������������ 23
iii
Table of Contents

Chapter 3: Even More Theory: Algorithms�������������������������������������������������������������� 25


Algorithm Cost Models���������������������������������������������������������������������������������������������������������������� 25
Data Access Algorithms�������������������������������������������������������������������������������������������������������������� 27
Storage Structures���������������������������������������������������������������������������������������������������������������� 27
Full Scan�������������������������������������������������������������������������������������������������������������������������������� 28
Index-Based Table Access����������������������������������������������������������������������������������������������������� 29
Index-Only Scan�������������������������������������������������������������������������������������������������������������������� 31
Comparing Data Access Algorithms�������������������������������������������������������������������������������������� 32
Index Structures�������������������������������������������������������������������������������������������������������������������������� 34
What Is an Index?������������������������������������������������������������������������������������������������������������������ 34
B-Tree Indexes����������������������������������������������������������������������������������������������������������������������� 36
Why Are B-Trees Used So Often?������������������������������������������������������������������������������������������� 38
Other Kinds of Indexes���������������������������������������������������������������������������������������������������������� 39
Combining Relations������������������������������������������������������������������������������������������������������������������� 39
Nested Loops������������������������������������������������������������������������������������������������������������������������� 40
Hash-Based Algorithms��������������������������������������������������������������������������������������������������������� 42
Sort-Merge Algorithm������������������������������������������������������������������������������������������������������������ 43
Comparing Algorithms����������������������������������������������������������������������������������������������������������� 45
Summary������������������������������������������������������������������������������������������������������������������������������������ 45

Chapter 4: Understanding Execution Plans������������������������������������������������������������ 47


Putting Everything Together: How an Optimizer Builds an Execution Plan��������������������������������� 47
Reading Execution Plans������������������������������������������������������������������������������������������������������������� 48
Understanding Execution Plans�������������������������������������������������������������������������������������������������� 53
What Is Going On During Optimization?��������������������������������������������������������������������������������� 54
Why Are There So Many Execution Plans to Choose From?�������������������������������������������������� 55
How Are Execution Costs Calculated?����������������������������������������������������������������������������������� 56
How Can the Optimizer Be Led Astray?��������������������������������������������������������������������������������� 59
Summary������������������������������������������������������������������������������������������������������������������������������������ 60

iv
Table of Contents

Chapter 5: Short Queries and Indexes�������������������������������������������������������������������� 61


What Makes a Query “Short”?���������������������������������������������������������������������������������������������������� 62
Choosing Selection Criteria��������������������������������������������������������������������������������������������������������� 64
Index Selectivity�������������������������������������������������������������������������������������������������������������������� 64
Unique Indexes and Constraints�������������������������������������������������������������������������������������������� 66
Indexes and Non-equal Conditions��������������������������������������������������������������������������������������������� 70
Indexes and Column Transformations����������������������������������������������������������������������������������� 70
Indexes and the like Operator����������������������������������������������������������������������������������������������������� 75
Using Multiple Indexes���������������������������������������������������������������������������������������������������������������� 77
Compound Indexes��������������������������������������������������������������������������������������������������������������������� 78
How Do Compound Indexes Work?���������������������������������������������������������������������������������������� 78
Lower Selectivity������������������������������������������������������������������������������������������������������������������� 80
Using Indexes for Data Retrieval������������������������������������������������������������������������������������������� 81
Covering Indexes������������������������������������������������������������������������������������������������������������������� 82
Excessive Selection Criteria�������������������������������������������������������������������������������������������������������� 83
Partial Indexes���������������������������������������������������������������������������������������������������������������������������� 89
Indexes and Join Order��������������������������������������������������������������������������������������������������������������� 90
When Are Indexes Not Used�������������������������������������������������������������������������������������������������������� 94
Avoiding Index Usage������������������������������������������������������������������������������������������������������������ 94
Why Does PostgreSQL Ignore My Index?������������������������������������������������������������������������������� 94
Let PostgreSQL Do Its Job!��������������������������������������������������������������������������������������������������������� 97
How to Build the Right Index(es)����������������������������������������������������������������������������������������������� 101
To Build or Not to Build�������������������������������������������������������������������������������������������������������� 101
Which Indexes Are Needed?������������������������������������������������������������������������������������������������ 102
Which Indexes Are Not Needed?����������������������������������������������������������������������������������������� 102
Indexes and Short Query Scalability����������������������������������������������������������������������������������������� 103
Summary���������������������������������������������������������������������������������������������������������������������������������� 103

v
Table of Contents

Chapter 6: Long Queries and Full Scans��������������������������������������������������������������� 105


Which Queries Are Considered Long?��������������������������������������������������������������������������������������� 105
Long Queries and Full Scans���������������������������������������������������������������������������������������������������� 107
Long Queries and Hash Joins��������������������������������������������������������������������������������������������������� 108
Long Queries and the Order of Joins���������������������������������������������������������������������������������������� 109
What Is a Semi-join?����������������������������������������������������������������������������������������������������������� 109
Semi-joins and Join Order��������������������������������������������������������������������������������������������������� 111
More on Join Order�������������������������������������������������������������������������������������������������������������� 113
What Is an Anti-join?����������������������������������������������������������������������������������������������������������� 116
Semi- and Anti-joins Using the JOIN Operator�������������������������������������������������������������������� 118
When Is It Necessary to Specify Join Order?���������������������������������������������������������������������� 120
Grouping: Filter First, Group Last���������������������������������������������������������������������������������������������� 123
Grouping: Group First, Select Last��������������������������������������������������������������������������������������������� 131
Using SET Operations���������������������������������������������������������������������������������������������������������������� 134
Avoiding Multiple Scans������������������������������������������������������������������������������������������������������������ 138
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 145

Chapter 7: Long Queries: Additional Techniques�������������������������������������������������� 147


Structuring Queries������������������������������������������������������������������������������������������������������������������� 147
Temporary Tables and CTEs������������������������������������������������������������������������������������������������������ 148
Temporary Tables���������������������������������������������������������������������������������������������������������������� 148
Common Table Expressions (CTEs)�������������������������������������������������������������������������������������� 150
Views: To Use or Not to Use������������������������������������������������������������������������������������������������������ 155
Why Use Views?������������������������������������������������������������������������������������������������������������������ 162
Materialized Views�������������������������������������������������������������������������������������������������������������������� 162
Creating and Using Materialized Views������������������������������������������������������������������������������� 162
Refreshing Materialized Views�������������������������������������������������������������������������������������������� 164
Should I Create a Materialized View?���������������������������������������������������������������������������������� 164
Do Materialized Views Need to Be Optimized?�������������������������������������������������������������������� 167
Dependencies���������������������������������������������������������������������������������������������������������������������� 167
Partitioning�������������������������������������������������������������������������������������������������������������������������������� 168

vi
Table of Contents

Does Partitioning Improve Performance?��������������������������������������������������������������������������������� 170


Why Create a Partitioned Table?����������������������������������������������������������������������������������������������� 173
Parallelism�������������������������������������������������������������������������������������������������������������������������������� 173
Summary���������������������������������������������������������������������������������������������������������������������������������� 174

Chapter 8: Optimizing Data Modification�������������������������������������������������������������� 175


What Is DML?���������������������������������������������������������������������������������������������������������������������������� 175
Two Ways to Optimize Data Modification���������������������������������������������������������������������������������� 175
How Does DML Work?��������������������������������������������������������������������������������������������������������������� 176
Low-Level Input/Output������������������������������������������������������������������������������������������������������� 176
The Impact of Concurrency Control������������������������������������������������������������������������������������� 177
Data Modification and Indexes�������������������������������������������������������������������������������������������������� 180
DML and Vacuum���������������������������������������������������������������������������������������������������������������������� 181
Mass UPDATE/DELETE��������������������������������������������������������������������������������������������������������� 181
Frequent Updates���������������������������������������������������������������������������������������������������������������� 182
Referential Integrity and Triggers���������������������������������������������������������������������������������������������� 182
Summary���������������������������������������������������������������������������������������������������������������������������������� 183

Chapter 9: Design Matters������������������������������������������������������������������������������������ 185


Design Matters�������������������������������������������������������������������������������������������������������������������������� 185
Why Use a Relational Model?���������������������������������������������������������������������������������������������������� 189
Types of Databases������������������������������������������������������������������������������������������������������������� 190
Entity-Attribute-Value Model����������������������������������������������������������������������������������������������� 190
Key-Value Model������������������������������������������������������������������������������������������������������������������ 191
Hierarchical Model�������������������������������������������������������������������������������������������������������������� 192
Combining the Best of Different Worlds������������������������������������������������������������������������������ 193
Flexibility vs. Efficiency and Correctness���������������������������������������������������������������������������������� 193
Must We Normalize?����������������������������������������������������������������������������������������������������������������� 195
Use and Misuse of Surrogate Keys������������������������������������������������������������������������������������������� 197
Summary���������������������������������������������������������������������������������������������������������������������������������� 203

vii
Table of Contents

Chapter 10: What About Configuration Parameters?�������������������������������������������� 205


PostgreSQL Configuration Parameters Overview���������������������������������������������������������������������� 205
Memory Allocation��������������������������������������������������������������������������������������������������������������� 206
Connections and Sessions��������������������������������������������������������������������������������������������������� 206
Tuning Parameters for Better Performance������������������������������������������������������������������������������ 208
Are There Better Ways?������������������������������������������������������������������������������������������������������������� 213
Other Limitations of Parameter Tuning������������������������������������������������������������������������������������� 216
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 216

Chapter 11: Application Development and Performance�������������������������������������� 217


Response Time Matters������������������������������������������������������������������������������������������������������������ 217
World Wide Wait������������������������������������������������������������������������������������������������������������������������ 218
Performance Metrics���������������������������������������������������������������������������������������������������������������� 219
Impedance Mismatch���������������������������������������������������������������������������������������������������������������� 219
A Road Paved with Good Intentions������������������������������������������������������������������������������������������ 220
Application Development Patterns�������������������������������������������������������������������������������������� 220
“Shopping List Problem”����������������������������������������������������������������������������������������������������� 222
Interfaces���������������������������������������������������������������������������������������������������������������������������� 224
Welcome to the World of ORM��������������������������������������������������������������������������������������������� 225
In Search of a Better Solution��������������������������������������������������������������������������������������������������� 227
Summary���������������������������������������������������������������������������������������������������������������������������������� 230

Chapter 12: Functions������������������������������������������������������������������������������������������ 231


Function Creation���������������������������������������������������������������������������������������������������������������������� 231
Internal Functions���������������������������������������������������������������������������������������������������������������� 232
User-Defined Functions������������������������������������������������������������������������������������������������������� 232
Introducing Procedural Language��������������������������������������������������������������������������������������� 233
Dollar Quoting���������������������������������������������������������������������������������������������������������������������� 234
Function Parameters and Function Output: Void Functions������������������������������������������������� 235
Function Overloading����������������������������������������������������������������������������������������������������������� 235
Function Execution�������������������������������������������������������������������������������������������������������������������� 237
Function Execution Internals����������������������������������������������������������������������������������������������������� 240

viii
Table of Contents

Functions and Performance������������������������������������������������������������������������������������������������������ 243


How Using Functions Can Worsen Performance����������������������������������������������������������������� 243
Any Chance Functions Can Improve Performance?������������������������������������������������������������ 245
Functions and User-Defined Types�������������������������������������������������������������������������������������������� 246
User-Defined Data Types����������������������������������������������������������������������������������������������������� 246
Functions Returning Composite Types�������������������������������������������������������������������������������� 247
Using Composite Types with Nested Structure������������������������������������������������������������������������� 250
Functions and Type Dependencies�������������������������������������������������������������������������������������������� 255
Data Manipulation with Functions�������������������������������������������������������������������������������������������� 255
Functions and Security������������������������������������������������������������������������������������������������������������� 257
What About Business Logic?����������������������������������������������������������������������������������������������������� 258
Functions in OLAP Systems������������������������������������������������������������������������������������������������������ 259
Parameterizing�������������������������������������������������������������������������������������������������������������������� 260
No Explicit Dependency on Tables and Views���������������������������������������������������������������������� 261
Ability to Execute Dynamic SQL������������������������������������������������������������������������������������������� 261
Stored Procedures�������������������������������������������������������������������������������������������������������������������� 261
Functions with No Results��������������������������������������������������������������������������������������������������� 261
Functions and Stored Procedures��������������������������������������������������������������������������������������� 262
Transaction Management���������������������������������������������������������������������������������������������������� 262
Exception Processing���������������������������������������������������������������������������������������������������������� 263
Summary���������������������������������������������������������������������������������������������������������������������������������� 264

Chapter 13: Dynamic SQL������������������������������������������������������������������������������������� 265


What Is Dynamic SQL���������������������������������������������������������������������������������������������������������������� 265
Why Dynamic SQL Works Better in Postgres����������������������������������������������������������������������� 265
What About SQL Injection?�������������������������������������������������������������������������������������������������� 266
How to Use Dynamic SQL for an Optimal Execution Plan��������������������������������������������������������� 266
How to Use Dynamic SQL in OLAP Systems������������������������������������������������������������������������������ 274
Using Dynamic SQL for Flexibility��������������������������������������������������������������������������������������������� 277
Using Dynamic SQL to Aid the Optimizer���������������������������������������������������������������������������������� 286
FDWs and Dynamic SQL������������������������������������������������������������������������������������������������������������ 289
Summary���������������������������������������������������������������������������������������������������������������������������������� 290
ix
Table of Contents

Chapter 14: Avoiding the Pitfalls of Object-Relational Mapping�������������������������� 291


Why Application Developers Like NORM����������������������������������������������������������������������������������� 292
ORM vs. NORM�������������������������������������������������������������������������������������������������������������������������� 292
NORM Explained����������������������������������������������������������������������������������������������������������������������� 294
NORM in the Application Perspective���������������������������������������������������������������������������������������� 301
NORM from a Database Perspective����������������������������������������������������������������������������������������� 304
Mapping JSON to the Database������������������������������������������������������������������������������������������� 305
Generating Database Code�������������������������������������������������������������������������������������������������� 306
Getting Data from the Database������������������������������������������������������������������������������������������ 308
Modifying Data in the Database������������������������������������������������������������������������������������������ 311
Why Not Store JSON?!�������������������������������������������������������������������������������������������������������������� 314
Performance Gains������������������������������������������������������������������������������������������������������������������� 314
Working Together with Application Developers������������������������������������������������������������������������� 315
Summary���������������������������������������������������������������������������������������������������������������������������������� 315

Chapter 15: More Complex Filtering and Search�������������������������������������������������� 317


Full Text Search������������������������������������������������������������������������������������������������������������������������� 317
Multidimensional and Spatial Search��������������������������������������������������������������������������������������� 319
Generalized Index Types in PostgreSQL������������������������������������������������������������������������������������ 320
GIST Indexes������������������������������������������������������������������������������������������������������������������������ 320
Indexes for Full Text Search������������������������������������������������������������������������������������������������ 320
Indexing Very Large Tables�������������������������������������������������������������������������������������������������� 322
Indexing JSON and JSONB�������������������������������������������������������������������������������������������������������� 323
Summary���������������������������������������������������������������������������������������������������������������������������������� 326

Chapter 16: Ultimate Optimization Algorithm������������������������������������������������������� 327


Major Steps������������������������������������������������������������������������������������������������������������������������������� 327
Step-by-Step Guide������������������������������������������������������������������������������������������������������������������� 328
Step 1: Short or Long?��������������������������������������������������������������������������������������������������������� 328
Step 2: Short������������������������������������������������������������������������������������������������������������������������ 328

x
Table of Contents

Step 3: Long������������������������������������������������������������������������������������������������������������������������� 330


Step 4: Incremental Updates����������������������������������������������������������������������������������������������� 330
Step 5: Non-incremental Long Query���������������������������������������������������������������������������������� 330
But Wait—There Is More!��������������������������������������������������������������������������������������������������������� 331
Summary���������������������������������������������������������������������������������������������������������������������������������� 332

Chapter 17: Conclusion����������������������������������������������������������������������������������������� 333

Index��������������������������������������������������������������������������������������������������������������������� 335

xi
About the Authors
Henrietta Dombrovskaya is a database researcher and
developer with over 40 years of academic and industrial
experience. She holds a PhD in computer science from
the University of Saint Petersburg, Russia. At present, she
is a database architect at DRW Holdings, Chicago, Illinois.
She is an active member of the PostgreSQL community, a
frequent speaker at the PostgreSQL conference, and the
local organizer of the Chicago PostgreSQL User Group. Her
research interests are tightly coupled with practice and
are focused on developing efficient interactions between
applications and databases.

Boris Novikov’s experience includes leading postgraduate


research groups and advising dozens of PhD students
while partnering and collaborating with industrial clients.
His research interests are in the broad area of information
management and include design, development, and tuning
of databases, applications, and database management
systems (DBMSs). He also has interests in distributed
scalable systems for stream processing and analytics.

xiii
About the Authors

Anna Bailliekova is Senior Data Engineer at


UrbanFootprint, where she works on data platform tools
and cloud ops for geospatial applications. Previously,
she worked in data engineering at Zendesk and held a
variety of DBA and BI roles at Epic. Her writing can be
found in the newsletter Better Streets MKE. She received
her undergraduate degree with college honors in political
science and computer science from Knox College in
Galesburg, Illinois.

xiv
About the Technical Reviewer
Tom Kincaid is Vice President of Database Development at EnterpriseDB. Tom
has been developing, deploying, and supporting database systems and enterprise
software for over 25 years. Prior to joining EnterpriseDB, Tom was General Manager of
2ndQuadrant in North America where he oversaw all aspects of 2ndQuadrant’s dynamic
and growing business for Postgres products, training, support, and professional services.
He worked directly with companies from all industries and of all sizes helping them
successfully make Postgres part of their mission-critical operations.
Tom has overseen the design and delivery of Postgres training solutions as well as
the deployment of PostgreSQL both at Fortune 500 financial institutions and at military
facilities all over the world. Teams Tom has managed have delivered major features that
have become part of the PostgreSQL open source database.
Tom is also the founder and one of the organizers of the Boston PostgreSQL
User Group.

xv
Acknowledgments
It takes many people to bring a book into the world, most of whose names do not appear
on the cover. Firstly, we want to thank Jonathan Gennick, who came up with the idea
of this book and navigated it through the first edition. Without his initiative, this book
wouldn’t exist. We’re also grateful to the entire team at Apress who have supported this
endeavor across two editions.
The contributions of Tom Kincaid as the technical reviewer cannot be overstated.
His careful, thorough, and thoughtful feedback improved the content, organization,
and usability of the text. This book is more precise, more understandable, and more
comprehensive, thanks to Tom. We’re grateful that he returned for the second edition,
graciously taking another close read. Any remaining issues are, of course, our own
responsibility.
After the first edition of this book was released, we heard from many people
regarding issues in the postgres_air database, topics readers wished were covered,
and passages that could have been more clear. This second edition incorporates many
of their suggestions. We are grateful to everyone who took the time to read the book
closely and share their comments and suggestions with us. In particular, Hannu Krosing
provided thorough, detailed, and specific feedback on postgres_air, and Egor Rogov
provided many helpful suggestions for making the book more understandable and clear.

—Henrietta Dombrovskaya, Boris Novikov, Anna Bailliekova

Thank you to Jeff Czaplewski, Alyssa Ritchie, and Greg Nelson, who spent hours,
days, and weeks making No-ORM (NORM) work with Java. My time at EDB was a chance
to work with and learn from the best of the Postgres best. My colleagues at DRW—both
application and database administrator (DBA) teams—have given me new opportunities
to push the limits of Postgres.
—Henrietta Dombrovskaya

xvii
Acknowledgments

I’d like to thank Andy Civettini for teaching me how to write and talk about technical
topics in an accessible way and for years of academic and professional encouragement.
My colleagues at UrbanFootprint challenge and inspire me every day. Finally, John,
Nadia, and Kira Bailliekova have each supported me and sacrificed for the sake of this
book; I am endlessly grateful to them.

—Anna Bailliekova

xviii
Introduction
“Optimization” is a broad enough term to encompass performance tuning, personal
improvement, and marketing via social engine and invariably evinces high hopes and
expectations from readers. As such, it is prudent to begin not by introducing what
is covered, but rather, why this book exists and what will not be covered, to avoid
disappointing readers who approach it with inappropriate expectations. Then, we
proceed with what this book is about, the target audience, what is covered, and how to
get the most use out of it.

Why We Wrote This Book


Like many authors, we wrote this book because we felt we could not not write it.
We are educators and practitioners; as such, we see both how and what computer
science students are taught in class and what knowledge they lack when they enter the
workforce. We do not like what we see and hope this book will help bridge this gap.
When learning about data management, most students never see a real production
database, and even more alarming, many of their professors never see one, either. While
lack of exposure to real-life systems affects all computer science students, the education
of future database developers and database administrators (DBAs) suffers the most.
Using a small training database, students can learn how to write syntactically correct
SQL and perhaps even write a SELECT statement that accurately retrieves desired data.
However, learning to write performant queries requires a production-sized dataset.
Moreover, it might not be evident that performance might present a problem if a student
is working with a dataset that can easily fit into the computer’s main memory and return
a result in milliseconds regardless of the complexity of the query.
In addition to lacking exposure to realistic datasets, students often don’t use DBMSs
that are widely used in industry. While the preceding statement is true in relation
to many DBMSs, in the case of PostgreSQL, it is even more frustrating. PostgreSQL
originated in an academic environment and is maintained as an open source project,
making it an ideal database for teaching relational theory and demonstrating database
internals. However, so far, few academic institutions have adopted PostgreSQL for their
educational needs.
xix
Introduction

As PostgreSQL is rapidly developing and becoming a more powerful tool, more


and more businesses are choosing it over proprietary DBMSs, in part to reduce
costs. More and more IT managers are looking for employees who are familiar with
PostgreSQL. More and more potential candidates learn to use PostgreSQL on their own
and miss opportunities to get the most out of it.
We hope that this book will help all interested parties: candidates, hiring managers,
database developers, and organizations that are switching to PostgreSQL for their
data needs.

What Won’t Be Covered


Often, when users start to complain that “everything is slow” or nightly backups finish
in broad daylight and everyone seems to be saying that “the database needs to be
optimized,” conversations are almost exclusively focused on database configuration
parameters and occasionally on underlying Linux parameters. It is often assumed that as
soon as the correct values for parameters are chosen and the database instance has been
restarted, all the world’s problems will be solved.
Countless times, we have worked with customers expecting magical incantations and
cheat codes. Countless times, these customers have expressed a deep disappointment
when the “wizards” to whom they have appealed suggest looking for the queries that
are executed most often or check for missing indexes. After listening politely to all our
suggestions, they kept asking: So can you suggest any other parameter changes?
Indeed, it is tempting to be able to solve every problem at once. That temptation
leads to the popular belief that there is a sort of dark magic and secret codes, a button
hidden under a desk somewhere that makes the database run faster.
Since we are aware of these misconceptions, we want to be transparent from the
very beginning. The following is the list of topics that are often discussed in books about
optimization but will not be covered in this book and why:

• Server optimization – With the mass migration to various cloud


environments and existing organizational structures, database
developers are unlikely to have a say in how servers are configured.

xx
Introduction

• PostgreSQL configuration parameters – In this second edition of the


book, we do cover this topic. However, it comprises a relatively small
portion of the book, as their impact on performance is overrated, as
we will demonstrate, and usually, database developers do not have
the necessary privileges to alter them (with a few exceptions).

• Distributed systems – We do not have enough industrial experience


with them.

• Transactions – Their impact on performance is very limited (although


we will cover some cases when they can have a major impact).

• New and cool features – These change with every new release, and
our goal is to cover the fundamentals.

• Magic, rituals, cheat codes, etc. – We are not proficient in these


approaches to optimization.

There are plenty of books available that cover all of the topics listed previously,
except the last, but this book is not one of them. Instead, we focus on everyday
challenges database developers face: when that one application page keeps timing out,
when a customer is kicked out of the application just before the “Contract Signed” page,
when the CEO dashboard is showing an hourglass instead of yesterday’s product KPI, or
when procuring more hardware is not an option.
Everything we are presenting in this book has been tested and implemented in an
industrial environment, and though it may look like magic, we will explain any query
performance improvement or lack thereof.

Target Audience
Most of the time, a book about optimization is viewed as a book for DBAs. Since our goal
is to prove that optimization is more than just building indexes, we hope that this book
will be beneficial for a broader audience.
This book is for IT professionals working in PostgreSQL who want to develop
performant and scalable applications. It is for anyone whose job title contains the
words “database developer” or “database administrator” or who is a backend developer
charged with programming database calls. It is also useful to system architects involved
in the overall design of application systems running against a PostgreSQL database.

xxi
Introduction

What about report writers and business intelligence specialists? Unfortunately, large
analytical reports are most often thought of as being slow by definition. However, if a
report is written without considering how it will perform, the execution time might end
up being not just minutes or hours, but years! For most analytical reports, execution time
can be significantly reduced by using simple techniques covered in this book.

What Readers Will Learn


In this book, the readers will learn how to

• Identify optimization goals in OLTP (Online Transaction Processing)


and OLAP (Online Analytical Processing) systems

• Read and understand PostgreSQL execution plans

• Identify indexes that will improve query performance

• Optimize full table scans

• Distinguish between long queries and short queries

• Choose the right optimization technique for each query type

• Avoid the pitfalls of ORM frameworks

At the end of the book, we present the Ultimate Optimization Algorithm,


which guides a database developer through the process of producing the most
performant query.

The Postgres Air Database


Throughout this book, examples are built on one of the databases of a virtual airline
company called Postgres Air. This company connects over 600 virtual destinations
worldwide, offers about 32,000 direct virtual flights weekly, and has over 100,000 virtual
members in its frequent flyer program and many more passengers every week. The
company fleet consists of virtual aircraft.
Please note that all data provided in this database is fictional and provided for
illustrative purposes only. Although some data appears very realistic (especially
descriptions of airports and aircraft), they cannot be used as sources of information about
real airports or aircraft. All phone numbers, email addresses, and names are generated.

xxii
Introduction

To install the training database on your local system, please refer to the GitHub repo:
github.com/Hettie-d/postgres_air.
The README.md file contains the link to the data directory and detailed installation
instructions.
In addition, after you restore the data, you will need to run the script in Listing 1 to
create several indexes.

Listing 1. Initial set of indexes

SET search_path TO postgres_air;


CREATE INDEX flight_departure_airport ON flight(departure_airport);
CREATE INDEX flight_scheduled_departure ON flight  (scheduled_departure);
CREATE INDEX flight_update_ts ON flight  (update_ts);
CREATE INDEX booking_leg_booking_id ON booking_leg  (booking_id);
CREATE INDEX booking_leg_update_ts ON booking_leg  (update_ts);
CREATE INDEX account_last_name ON account (last_name);

We will use this database schema to illustrate the concepts and methods that are
covered in this book. You can also use this schema to practice optimization techniques.
This schema contains data that might be stored in an airline booking system. We
assume that you have booked a flight online, at least once, so the data structure should
be easily understood. Of course, the structure of this database is much simpler than the
structure of any real database of this kind.
Anyone who books a flight needs to create an account, which stores login
information, first and last names, and contact information. We also store data about
frequent flyers, which might or might not be attached to an account. A person who
makes a booking can book for several passengers, who might or might not have their
accounts in the system. Each booking may include several flights (legs). Before the flight,
each traveler is issued a boarding pass with a seat number.
The Entity-Relationship (ER) diagram for this database is presented in Figure 1.

• airport stores information about airports and contains the airport’s


three-character (IATA) code, name, city, geographical location, and
time zone.

xxiii
Introduction

• flight stores information about flights between airports. For each


flight, the table stores a flight number, arrival and departure airports,
scheduled and actual arrival and departure times, aircraft code, and
flight status.

• account stores login credentials, the account holder’s first and


last names, and possibly a reference to a frequent flyer program
membership; each account may potentially have multiple phone
numbers, which are stored in the phone table.

• frequent_flyer stores information about membership in the frequent


flyer program.

• booking contains information about booked trips; each trip may have
several booking legs and several passengers.

• booking_leg stores individual legs of bookings.

• passenger stores information about passengers, linked to each


booking. Note that a passenger ID is unique to a single booking;
for any other booking, the same person will have a different
passenger ID.

• aircraft provides the aircraft’s description, and the seat table stores
seat maps for each of the aircraft types.

• Finally, the boarding_pass table stores information about issued


boarding passes.

xxiv
Introduction

Figure 1. ER diagram of the booking schema

xxv
CHAPTER

The Key to
Digital
Transformation
Success
In the age of digitization, businesses face a critical imperative: to adapt and
embrace innovation or risk being left behind in a rapidly evolving world.
The concept of creative destruction, which is the process where innovation
and technology advancements are reshaping industries and business models,
is the driving force behind digital transformations. In this chapter, you’ll
explore what digital transformation is and the state of digital transformation
programs where unfortunately there is a high failure rate. Learn about the
challenges of digital transformation and the key role strategic alignment plays
in its success. Discover how process serves as a common language, aligning
organizations vertically and horizontally, and explore the Process Inventory

© Michael Schank 2023


M. Schank, Digital Transformation Success,
https://doi.org/10.1007/978-1-4842-9816-9_1
4 Chapter 1 | The Key to Digital Transformation Success

framework’s role in identifying, managing, and aligning processes. By the end


of this chapter, you’ll be equipped with an understanding of how Process
Inventory not only enables digital transformation’s success but also has the
power to transform how the organization integrates technical capabilities,
leads to operational excellence, streamlines the management of change, and
enhances risk management capabilities.

Nokia’s Mobile Phone Business


Founded in 1865 in Finland, Nokia initially focused on various industries,
including pulp and paper, rubber, and electronics [1]. In the 1990s, Nokia
made a strategic decision to shift its focus toward mobile phones. The
company overtook Motorola in October 1998 to become the best-selling
mobile phone brand in the world. Their net operating profits went from $1
billion in 1995 to almost $4 billion by 1999. A major reason for their success
was catering to a youthful consumer market and fashion-oriented consumers
with colorful and replaceable back covers. They were also innovators,
introducing the first camera phone to the market in 2002 and pioneering
mobile gaming with a preloaded version of Snake.
In 2007, Apple introduced the iPhone. By Q4 2007, half of all smartphones
sold in the world were Nokias, while the iPhone market share was 5% [2].
The iPhone revolutionized the mobile industry with its touchscreen interface
and robust app ecosystem. Nokia underestimated the impact of smartphones
and the changing preferences of consumers. They continued to rely on their
traditional strengths, such as hardware design and the Symbian operating
system, while underestimating the importance of software and user
experience. The Symbian platform quickly became outdated and posed
difficulties for developers after the advent of iOS and Android. Nokia’s market
share dropped by 90%, and in 2013, their mobile phone business was acquired
by Microsoft.
A study named “Distributed Attention and Shared Emotions in the Innovation
Process: How Nokia Lost the Smartphone Battle” [3] was conducted,
interviewing 76 of Nokia’s top and middle managers, engineers, and external
experts to determine the root causes. The study found that the downfall can
be attributed to a lack of organizational alignment. It highlighted several
factors, including a culture of fear, intimidated middle managers, a lack of
technical competence among top managers, and a short-term focus on market
demands. The internal politics and shared fear created a climate of mistrust
that hindered innovation.
Digital Transformation Success 5

Creative Destruction in the Age of Digitization


The concept of creative destruction, introduced by Austrian American
economist Joseph Schumpeter in 1942 [4], has impacted various companies,
such as Nokia, Blockbuster Video, Kodak, Blackberry, and Toys ‘R’ Us to name
a few. Creative destruction describes the process whereby innovation and
technological advancements disrupt established industries and business models.
According to Schumpeter’s theory, it is inherent in human nature to be
creative and strive for an improved standard of living. Additionally, the
pursuit of profit incentives drives constant innovation and technological
advancements [5]. In a competitive environment, producers generate ideas
that advance technologies, redesign existing products and processes, and
introduce new products. This competition results in improved products at
lower costs, ultimately benefiting consumers.
This continuous process of innovation and economic competition contributes
to overall economic growth and enhances the standard of living for consumers.
However, it also poses a significant risk to incumbent organizations that fail to
adapt as they can be displaced or even eliminated by more innovative
competitors. This is driving the urgency in many organizations to invest in
their own digital transformation program.

Digital Transformation Defined


Digital transformation is the application of digital capabilities to processes,
products, and assets to improve efficiency, enhance customer value, manage
risk, and uncover new monetization opportunities [6]. There are many digital
capabilities driving this, such as artificial intelligence, cloud computing, Internet
of Things (IoT), big data analytics, blockchain, and more. This goes beyond
simply acquiring these new technologies and teaching your staff to use them.
Digital transformation must be framed in a business context, which is why the
preceding definition includes “uncover new monetization opportunities.”
Monetization opportunities may mean new product revenue streams,
deepening customer relationships, expanding to new ones, or reducing the
cost of doing business. The implications of maximizing these capabilities for an
organization can be far-reaching and may fundamentally change core
business models.
The essence of digital transformation lies in becoming a customer-centric,
data-driven, and agile organization. It entails ensuring that key decisions,
actions, and processes are guided by data-driven insights rather than just
human intuition [7].
6 Chapter 1 | The Key to Digital Transformation Success

The challenge, and opportunity, is that the capabilities of these technologies


are advancing at a rapid rate, making it hard to accurately predict how they
will impact businesses in the next five years or beyond. The external
environment must also be factored in, such as changes to the competitive
landscape, customer preferences, globalization, and regulatory environment.
This means that digital transformation must be viewed as a continuous
journey, requiring a strong digital strategy and adaptive execution to respond
to changes through iterations and continuous learning. A crucial factor in
being adaptive is achieving operational excellence, which involves optimizing
and maximizing efficiency across all resources leveraged to operate your
business. By embracing operational excellence, organizations ensure their
flexibility and responsiveness in the face of advancing digital capabilities and
evolving external environments.

State of Digital Transformation


According to a study, digital companies achieve 1.8 times higher [8] earnings
growth. Technology advancements mean that digital companies have greater
productivity improvements, better customer experiences, and stronger innovation.
The global digital transformation market is projected to grow from $695.5 billion
in 2023 to over $3.14 trillion by 2030, at a compound annual growth rate (CAGR)
of 24.1% during this period [9]. About 89% [10] of enterprises are planning to
adopt or have already adopted a digital business strategy.
Shockingly, 70% of such initiatives have been found to fail to reach their goals
[8]. This represents a massive investment with a very high failure rate. The
implication is more than just lost investment; it also means frustrated
stakeholders, lost ground to competitors, unsatisfied customers, and in some
cases, costs such as high regulatory penalties.

Why Digital Transformations Fail


According to McKinsey [11], the reasons transformations fail are as follows:
• Lack of Aspiration: The CEO fails to set a sufficiently
high aspiration. People throughout the organization do
not buy in, and they lack the motivation to invest extra
energy in making the change happen.
• Lack of a Shared Vision: During the early stages of the
transformation, the CEO does not build conviction
within the team about the importance of the change or
craft a change narrative that convinces people they need
to drive the transformation.
Digital Transformation Success 7

• Lack of Engagement: People throughout the


organization do not buy in, resulting in a lack of willingness
to invest the extra energy required to drive the
transformation.
• Low Investment in Capability Building: The
leadership team neglects to address skill gaps within the
organization or fails to free up key resources from their
other day-to-day responsibilities.
• Insufficient Structure of the Transformation
Team: The organization fails to establish the right change
management structure and cadence for leadership and
transformation management oversight.
For many medium and large organizations, these can be challenging hurdles to
overcome due to their complexity. With organizations that have tens or
hundreds of thousands of employees, it becomes an immense challenge to align
and coordinate all those resources, especially when the transformation goals
are ambitious. However, complexity alone cannot be solely blamed as there are
many digitally successful organizations that effectively manage complexity.
The underlying root cause of these challenges is a lack of strategic
alignment. Strategic alignment means that all elements of a business,
including market strategy and the way the company is organized, are arranged
in such a way as to best support the fulfillment of its long-term purpose [12].
This means aligning the purpose, vision, and mission statements, which
articulate why the organization exists and the future they are driving toward,
with strategy, which is how the business will achieve that purpose. Strategy
defines which products and services to offer, which markets to serve, and in
this context, how they will adopt digital technology to further support the
purpose of the organization. Strategy needs to be aligned with the capabilities
of the organization, which are all resources including people, processes,
technology, data, vendors, etc. that support the organization. An example is
an organization that is looking to achieve superior customer service must
translate that into a high level of excellence when frontline staff are engaging
with customers directly.
There are two important aspects of strategic alignment: vertical alignment
and horizontal alignment. Vertical alignment refers to aligning strategies, goals,
and performance metrics hierarchically from the CEO through middle
management down to the single contributors. Horizontal alignment means
that business units and functional areas such as technology, finance, and risk
collaborate strongly across these areas and avoid siloed operating models,
which bring a great number of inefficiencies. Achieving strategic alignment
facilitates unification across resources which not only enables an organization
to meet their digital transformation goals but enables organizational agility.
8 Chapter 1 | The Key to Digital Transformation Success

But how do organizations achieve strategic alignment? After all, this is not a
new concept, yet it exists in so few organizations. I believe the answer lies in
language. Everyone in these organizations is focused on their responsibilities,
and they develop their perspectives based on their work. This often results in
lower-level contributors not fully understanding the strategic messages
coming from the CEO. As a result, they may fail to invest their energies in
contributing to the transformational ambitions of leadership. When a person
from a business unit conveys requirements to a technology professional, they
may struggle to accurately communicate what they are looking for, leading to
poor requirements, or delivered software that misses the mark. This lack of
understanding and effective collaboration contributes to the formation of
redundancies within organizations, where different functional units create
processes that others already perform.
A common language should create a shared understanding vertically and
horizontally. It would align objectives, facilitate better communications, bridge
cultural differences, and enable conflict resolution. What are the requirements
of this common language? First, since it must support the purpose of the
organization, it has to be oriented in the language of the business. This
eliminates, for instance, technical terminology, you wouldn’t want to state as
a strategy that you’re going to implement artificial intelligence unless you
could convey how it supports your customers, generates revenues, or furthers
the mission. But it does have to be a bridge to cross-functional topics such as
technology, risk, data, and regulators. Lastly, it needs to connect a high-level
view that senior leadership would understand to a low-level view that a single
contributor would understand.

Process Is the Common Language


The only candidate that meets those requirements is process. I’ll illustrate this
in a story that highlights how organizations evolve with process at its core.
Let’s say that you are talking to a couple of friends about starting a business.
That conversation begins with the actions or processes that must occur. The
conversation would go something like this: “We can create great designs,
print them on t-shirts, and sell them at concerts.” The purpose of the company
will be to make money or get a message out, but in that statement, the
business processes have been identified:
• Create designs
• Print design on T-shirts
• Sell at concerts
Digital Transformation Success 9

Let’s say that this company has success. Then they realize that they will have
to file taxes, but none of them have the skill set or the time, so they hire
someone for that purpose and have now added the process of
• Calculate tax liabilities
• File taxes
• Pay tax liabilities
This means that they’ve now expanded the organization chart to support the
need to do taxes. Then they purchase tax software for them which is the
beginning of their technology portfolio. The business is doing so well that you
seek out investors, but investors will want financial reports that are based on
solid accounting standards, which leads to them hire an accountant to perform
the following processes:
• Close books
• Create financial report
This accountant will require accounting software. Now they’ve started a
finance functional unit which has tax and accounting processes, an organization
chart, and a technology portfolio.
I can go on, but what you can see is that the needs of the organization to
support its purpose drive the need for processes. Process is core to
organizational capabilities as people are hired, technology is purchased or
built, and risk is incurred, all to support the processes of the business. Plus, a
hierarchy of processes evolves as processes get more complex and lower-
level resources are hired to perform more detailed tasks.

The Process Inventory Framework


The Process Inventory is a framework for capturing every process within an
organization and a methodology for managing this information sustainably
over time. One of the guiding principles for Process Inventory is that it must
be a complete representation of processes for the organization in scope. To
accomplish this, interviews must be conducted following the organizational
chart since that represents a complete inventory of people in the organization.
These interviews start at the top of the organizational chart, working down
from business units or functional levels to the team or individual contributor
level. Stakeholders are requested to provide formal attestations to ensure
completeness and accuracy in the inventory, including any process inventories
collected by their teams.
10 Chapter 1 | The Key to Digital Transformation Success

Starting from the top of the organizational chart enables vertical alignment,
allowing for a direct trace of process ownership from the CEO to individual
contributors at all levels.
Organizations often have multiple sources of information that describe
various aspects of their operations, such as application repositories, risk
repositories, product, and channel repositories, and more. However, this data
is usually managed in silos and lacks concrete associations across topics,
hindering horizontal alignment.
The Process Inventory framework establishes a taxonomy that classifies all
processes executed to support the organization’s purpose. This taxonomy
serves as an index for aligning different aspects of the organization through a
single business-oriented language. A modeling team can extract information
from these repositories and create associations, at the process name level or
through creating process models, where operational information intersects
with processes.
This achieves horizontal alignment in three ways. Firstly, it enables functional
teams to precisely identify how their concepts intersect with processes. For
example, by examining the intersection of applications in an application
repository with processes, it becomes possible to determine which applications
support specific processes and even drill down to the level of identifying which
APIs within those applications support specific steps in a process. This is
valuable in identifying the scope and requirements for change management
initiatives. Secondly, it provides transparency to all stakeholders regarding the
activities of each business unit and functional team. This transparency helps
break down silos and facilitates better coordination. Lastly, it promotes a
culture of accountability by identifying points of ownership and fostering
strong collaboration across organizational units where necessary.
This framework is analogous to Google Maps, where you can view Earth from
space, but then you can zoom in to see details of your house and the signs on
your street. Google’s initiative called Ground Truth [13] marries numerous
data sets about our world, such as traffic patterns, restaurant ratings, and
street view images to physical locations. This has revolutionized not only
navigation but also how we interact in the world and how advertisers reach us.

The Digital Transformation Journey


In a digital transformation, this common language enables the leadership team
to articulate their aspirations for a digital future, and the transformation
teams can identify specific processes that need to change or processes to be
added. The shared vision can be cascaded throughout the organization, clearly
defining responsibilities and performance metrics to drive the transformation.
This culture of accountability will foster engagement as everyone will
Digital Transformation Success 11

understand how their work directly contributes to the bigger picture.


Essentially, this enables solutions to the typical failures encountered in digital
transformations.
In this book, I will extensively detail the constructs of this framework, including
the operating model and the methods to create and maintain the process
inventory and associated metadata sourced from various repositories.
I will cover the method of defining a digital strategy and how to set up the
transformation program for success. The core of this process involves defining
the digital transformation strategy in the context of how it supports the
organization’s purpose and aligns with operational capabilities. This
encompasses defining the business areas and use cases that need improvement,
along with the ways of working. I provide details on how the Process Inventory
framework can transform these use cases.
A significant aspect of adapting to the digital age is integrating new technology
capabilities. Technology is typically one of the largest investments an
organization makes and can be a source of pain, especially when the technical
architecture becomes rigid. I will detail how this framework can lead to much
better IT architecture documentation, creating alignment between IT assets
and the processes they serve. This visibility can help rationalize complexity by
eliminating redundant systems and increasing reuse, which is key to flexibility
and efficiency. Additionally, I will demonstrate how this directly supports the
design and implementation of digital technologies such as intelligent process
automation, the adoption of artificial intelligence and machine learning at
scale, and how to build a business-led modular architecture design, which is
crucial for an agile architecture.
Operational excellence is achieved with this level of transparency at your
fingertips. You can precisely identify all the resources that support a business
or process area, enabling the identification of inefficiencies or opportunities
to streamline operations. Continuous improvement will be promoted by a
framework that enables better monitoring of business processes and the
collection of key performance indicators.
Workforces will be transformed by having greater training and development
programs to equip staff members with skills and knowledge, not only in their
domain but also with a broader understanding. This will foster a culture of
innovation by unlocking knowledge that was held by so few and encouraging
everyone to identify better ways of doing things.
Change management is a significant challenge for many organizations,
particularly in large change efforts. This framework has the potential to greatly
transform the entire process. The alignment of strategic priorities can be
mapped to the impacted processes. This clarity brings more objectivity to the
change portfolio investment process, resulting in stronger effectiveness in the
allocation of discretionary funds to projects with the greatest strategic needs.
12 Chapter 1 | The Key to Digital Transformation Success

Project scope can be stated in terms of the business processes involved. This
approach ensures certainty of impacts across all resources leveraged by the
business process, including people, processes, controls, data, and technology.
The result is enhanced cost and timeline estimates and better resource
alignment.
The change process would undergo significant changes by anchoring it to this
framework. Framing the contents of SDLC, Agile, and organizational change
management deliverables, such as business requirements, agile user stories,
technology designs, control designs, testing scripts, and user training, using
the Process Inventory taxonomy as the structure will increase coordination
across teams and enhance traceability for those responsible for project
management in these efforts. This also has the benefit of generating better
change status reports by communicating the progress and readiness of
individual processes as the numerator for percent complete reporting.
The efficiencies provided by this framework will enable faster change
implementation with reduced investment needs, thereby freeing up resources
to concentrate on enhancing customer experience and driving product
innovations.
Risk management is strengthened by giving risk professionals a
comprehensive inventory of processes, which will enable them to perform
better risk assessments and create a more accurate inventory of risks across
all risk types. This allows them, in conjunction with their business partners, to
prioritize and design effective controls and ensure regulatory compliance. The
risk operating model will be empowered across all three lines of defense for
stronger effectiveness and coordination such as arming internal audit with
information needed to effectively test controls. This will give senior leaders
and boards confidence that they are getting accurate risk information to make
their strategic decisions.

Framework Implementation Considerations


This may seem overwhelming, but I assure you it’s not. I have dedicated 12
years of my career to developing and testing this framework in various
scenarios. I have successfully implemented it at multiple large financial
institutions, tailoring it to their specific needs. I have refined the methods to
be efficient with limited resources and to ensure the quality of the models,
which forms the basis for all the benefits I have presented.
The framework is designed to be incremental and scalable according to your
requirements as defined by your transformation strategy. It can be applied at
the enterprise level or selectively to specific business units or functions. You
have the flexibility to implement only the use cases that are relevant to your
organization.
Digital Transformation Success 13

Indeed, adopting this framework requires an investment of time and resources.


However, it’s important to recognize that organizations pay a price for
misalignment. You have a choice: invest upfront to avoid inefficiencies, costly
penalties, or losing market share to more digitally adept competitors, or bear
the consequences later.

Key Takeaways
• Creative destruction is driving the digital age through
innovation and technological advancements which are
reshaping business models and industries.
• Digital transformation is the application of digital
capabilities to processes, products, and assets to improve
efficiency, enhance customer value, manage risk, and
uncover new monetization opportunities.
• High failure rate as 70% of such initiatives fail to reach
their goals, which means lost investment, frustrated
stakeholders, lost ground to competitors, unsatisfied
customers, and potentially high regulatory penalties.
• Lack of strategic alignment is the underlying root
cause of failure which hinders collaboration and
organizational focus toward strategic goals.
• A common language is needed to facilitate alignment.
Process, as captured by the Process Inventory framework,
provides the common language.
• Process Inventory enables digital transformation
success and transforms how the organization operates
which leads to operational excellence.
In the next chapter, we will describe the Process Inventory framework, which
includes models, modeling characteristics, metadata, and conceptual
architecture.
CHAPTER

Overview of
the Process
Inventory
Framework
In this chapter, you will explore the components of the Process Inventory
framework. Delve into the significance of this framework in establishing an
ontology to organize organizational knowledge. Understand the methods for
constructing and maintaining a Process Inventory, and explore the conceptual
architecture used to integrate metadata from diverse authoritative sources.
Additionally, you’ll gain insights into related models, such as process models,
customer journeys, and value streams. The framework, with all its associated
components, is critical for structuring and utilizing knowledge effectively
within an organization to deliver transformational value.

© Michael Schank 2023


M. Schank, Digital Transformation Success,
https://doi.org/10.1007/978-1-4842-9816-9_2
16 Chapter 2 | Overview of the Process Inventory Framework

he Origins of the Process


T
Inventory Framework
I started my career in 1996 at Andersen Consulting, which later became
Accenture. My college degree had a focus on information systems, so I began
in a technology practice. My first engagement was with a large bank in
Charlotte that was developing a direct banking platform, an emerging concept
at that time.
I initially joined a production support team where we handled issues with
middleware code. Middleware is an application pattern for distributing
messages to appropriate platforms. My role involved triaging issues, identifying
root causes within the application code, and developing and testing fixes.
During the first 15 years of my career, I primarily focused on technology. I
worked as a C++ and Java developer and a solution architect and led large
teams in software delivery.
I transitioned from retail banking to commercial banking without having a
strong understanding of these businesses. While I knew about retail banks
since I was a customer with a checking account, commercial banking was
completely foreign to me. My focus was on delivering quality software on time
and supporting production to minimize customer impact. Most of my
interactions were with other technologists; I was curious about what the
business did, but I didn’t have a clear path to explore it.
In 2011, I joined EY, which introduced me to a new world. At that time, EY
had limited software development engagement, and their clients were typically
senior leaders across various business areas such as risk, technology, and
more. The work involved helping these leaders develop solutions to enhance
their organizations’ effectiveness. It was a refreshing shift from my technology-
centric mindset.
One of my early engagements at EY was with a large retail bank. They had
surplus budgeted funds that needed to be spent; otherwise, the funds would
be lost the following year. One of their requirements was to build a business
capability model for their retail banking business. While not an exhaustive
exercise, we interviewed key individuals in their businesses and created a
model with three levels of depth. It was a moment of epiphany for me. The
entire business’s activities were encapsulated in a single model, exactly what I
had been seeking during my technology days to understand what the business
did. I was enthused about the potential of this concept to bring diverse
perspectives together and what this could mean for delivery on a wide range
of topics. From that point on, I positioned myself as a business architect,
eager to delve deeper into this concept, and using this branding helped me
connect with clients implementing similar approaches.
Digital Transformation Success 17

BUSINESS ARCHITECTURE

Business architecture emerged as a concept in the 1980s. British management


consultant Edwin E. Tozier was one of the first to mention the concept in an article
he wrote titled “Developing Strategies for Management Information Systems” [1].
In this article, he distinguished between information architecture and business
architecture, stating his theory that each business function may be supported by one
or more information systems and that information systems need to be adaptable to
organizational strategies.
Business architecture has evolved significantly since then. Several standard-setting
organizations such as TOGAF (The Open Group Architecture Framework), OMG (Object
Management Group), the Business Architecture Guild, and others have been advancing
the concepts and practices, although a common definition remains elusive.
The definition that has resonated the most with me is from OMG, which states
that business architecture is “a blueprint of the enterprise that provides a common
understanding of the organization and is used to align strategic objectives and tactical
demands” [1]. This definition always made intuitive sense to me as changes to a
physical building wouldn’t be made without such a blueprint, but many organizations
will spend significant amounts of money without any similar concept.
The core deliverable in business architecture is the business capability model. A
business capability model represents the required capabilities that an organization
must deliver for its purpose. They are largely independent of specific organizational
structures, reporting relationships, political agendas, cultural aspects of individual
business leaders, current initiatives, and projects [2]. Business capability models have
been used for various purposes, such as strategic planning, where a heatmap may
be created to highlight the capabilities in most need of improvement and investment.
They are also used to map assets, such as IT systems, which enables better
communication with teams involved in implementing strategies. Generally, however,
business architecture and business capability models do not model specific processes
as their aim is to be high level and agnostic to organizational structure.

Shortly after that, I was brought in to assist a client in the mortgage industry.
As a mitigation strategy following the 2008 financial crisis, they had decided
to outsource several critical business functions to a third-party provider.
However, the project was in deep trouble, with status reports showing red on
most measures despite a significant investment made in terms of dollars and
resources. The requirements team lacked structure and was not making
progress toward delivering a complete and high-quality product. Additionally,
the business architecture team they had in place was struggling to add value.
Recognizing the need for a strategic pause to recalibrate the approach, the
senior client stakeholders gave us a three-week timeframe.
18 Chapter 2 | Overview of the Process Inventory Framework

The business architecture team was implementing an approach I had not


encountered before. They utilized a sophisticated modeling platform and
connected their business capability model to detailed process models. During
the pause, I collaborated with the leadership of the business architecture team
to develop a comprehensive plan. This plan included a stakeholder engagement
model, a rigorous approach to work product creation, developing standards, a
quality assurance process, and even an estimating model for more precise
delivery date projections. When the work resumed, we essentially created a
Process Inventory, although that was not the name used at that time. We
conducted interviews with functional areas to capture every process they
performed and then created process models to detail how those processes
were executed. These inventories and process models underwent a stringent
quality assurance review to ensure compliance with standards before the
identified process owner attested to their accuracy. This structure enabled the
requirements team to measure their progress toward completion, gain a
detailed understanding of the process operations, and obtain sign-off on final
requirements from named process owners. By establishing this factory-like
model with clear activity sequences and accountabilities, the project transformed
from red to bright green. This experience taught me valuable lessons, particularly
the anchoring power of this concept in large-scale transformation programs. I
also recognized the importance of connecting business processes, maintaining
high standards, and prioritizing quality as critical success factors.
From that point on, I sought to refine this methodology and test it in diverse
scenarios, including an insurance spin-off, a bank merger, strategic architecture
design for a wealth management firm, business continuity planning for a capital
markets firm, and risk management for a global financial utility.
My focus shifted to selling this concept within the financial services industry,
which put me in front of numerous clients with complex problems to solve.
While many of these clients acknowledged the significance of process within
their solutions, they struggled to articulate how it would play a role. For
others, I seamlessly integrated it into proposals, knowing it would be beneficial.
Regardless, I achieved success in selling the approach as its intuitive appeal
resonated with everyone.
This chapter delves into the framework’s details, encompassing various
models and their interconnectedness, providing a solid foundation for
transformation initiatives.

The Process Inventory Framework


In Chapter 1, I described how Process Inventory is a common language that
facilitates strategic alignment, which is critical for transforming an organization
into the digital age and operating with excellence. This is certainly true, but
I’d like to go a bit deeper to describe what it represents.
Digital Transformation Success 19

The Process Inventory framework represents an ontology for an organization.


The word “ontology” gained usage with ancient philosophers like Plato and
Aristotle. “Ontology” comes from the Greek words “ontos,” meaning “being,”
and “logos,” meaning “study” or “discourse” [3]. As they defined the term,
ontology was the study of what exists and how the things that exist relate to
each other, providing answers to fundamental questions about existence.
In modern times, ontologies are used in many fields such as information
sciences, Semantic Web, bioinformatics, healthcare, natural language
processing, artificial intelligence, and more. Today, the concept is defined as a
formal representation of knowledge that encompasses a set of concepts, their
properties, and the relationships between them within a specific domain. It
provides a shared understanding of the structure and semantics of a domain,
enabling effective knowledge organization, reasoning, and information
integration [4]. To put this in layman’s terms for an organization, it maps out
how all the resources and concepts intersect to support the mission of the
organization.

Purpose & Strategy


Vision Customers
Mission
Product & Channels Customer Persona
Goals
Customer Journeys
Objectives

Product Category Channels


Tactics Moments of Truth

Product Subcategory
Interactions
Product

Process Risk Management


Enterprise Architecture
External
Events
System Interfaces Systems Control
Functions Risk
Regulatory
Obligation Laws,
Platform / Service Regulations

Vendor Contract Data


Element
Vendor
Level N Data Enterprise Data
Entity
Vendor Management Data
Level 2
Subject
Area
Organizational Level 1
Structure

Figure 2-1. Organizational Ontology


20 Chapter 2 | Overview of the Process Inventory Framework

Figure 2-1 is a visual representation of this ontology. As you can see, and this
is not an exhaustive representation, there are numerous concepts that must
come together to support an organization. Organizing knowledge in a specific
domain is typically done through a taxonomy. Taxonomies are classification
systems in which entities in domains are placed in hierarchical categories that
are exclusive and exhaustive. Exhaustive means that every possible category,
especially at the top of the hierarchy, is represented, and exclusive means that
every entity belongs to only one category. To illustrate this, I’ll use the classic
example of the animal kingdom taxonomy. At the top level of the hierarchy,
each animal is classified as vertebrate or invertebrate. A level below vertebrates
are reptiles, birds, fish, mammals, and amphibians. The levels go deeper, but
this taxonomy is exhaustive as there are no other high-level categories. It’s
exclusive in that any animal can exist in one and only one category.
As represented in Figure 2-1, each of the concepts that support an organization
is its own taxonomy, which makes the ontology for an organization a
polycategorical ontology, meaning knowledge is to be understood in how
multiple taxonomies intersect. In polycategorical ontologies, entities are
distinguished by how fundamental they are to the ontology, meaning how
dependent their existence is relative to other entities. I discussed in Chapter 1
that the organization’s purpose and strategy are the most fundamental to the
existence of everything, but after that, the process is fundamental to all
capabilities of the organization. For instance, an accounting system wouldn’t be
needed without the need for accounting processes.
The earlier ontology definition includes understanding the relationships
between concepts within a specific domain; in this case, the domain is the
organization. So, a consistent approach for mapping the concepts between
these taxonomies is needed to have a coherent representation of knowledge.
Since process is the most fundamental to the capabilities of the organization,
it must be the top-level concept, meaning the entities in other taxonomies
need to be mapped to how they support processes in the Process Inventory
taxonomy. That is how process becomes the common language of the
organization within this ontology.
Since organizational units are constructed to support the need of processes,
this ontology explicitly maps disparate concepts to the Process Inventory
taxonomy, providing horizontal alignment of knowledge and information.
For the remainder of this book, I will refer to the integration of these concepts
as process metadata, which is information about the process. There are
two broad categories of metadata. The first is operational information
metadata, which provides information on the process’s existence. This
includes the products it supports, the legal entity it belongs to, or who owns
the process, or the business capabilities it represents. The second is resource
metadata, which details the resources leveraged in the execution of the
Digital Transformation Success 21

process. This includes systems, data, channels, organizational units, third-


party vendors, etc. The implication for modeling is that operational information
metadata can be designated at the taxonomy or process definition level, while
resource metadata can be further detailed through process models.
Figure 2-2 shows the same model but framed hierarchically. Since Process
Inventory is constructed following the organizational structure, then it
provides views that are relevant from the CEO through a low-level individual
contributor, which is key to vertical alignment.

Why
Purpose – Vision, Mission
Strategies - Goals, Objectives, & Tactics

Motivates Delivers

The Process Inventory Framework

Customer
Personas

Engages Engages
What
Customerr Journeys / Value Stream
lue/offerings to customers
What value/offerings

Leverages Enables Who


Process Inventory
at the business does
What

Defines Implements

Processes How
How
w processes executes

Requires Supports

Process Metadata With What


Actors, systems,
ems, data, risk/controls, metrics

Figure 2-2. The Process Inventory Framework

This framework clearly delineates aspects of the 5W (and 1 H) model, which


are crucial for understanding the motivational system of the organization.
This provides a tool that helps organizations connect the “Why” in terms of
22 Chapter 2 | Overview of the Process Inventory Framework

their purpose and strategies to the “What” processes they execute to achieve
their goals, the “Who” responsible for the results, and the “How” those
processes are performed, as well as “With What” resources are leveraged.
The framing in Figure 2-2 will be leveraged in the rest of this chapter to
describe various parts of this framework.

Process Inventory
Definition
Merriam-Webster defines a process as “a series of actions or operations
conducing to an end.” I point out this definition to highlight that this framework
takes a generous definition, meaning that the goal of Process Inventory is to
identify every action that is performed by anyone in the organization, any
customer-facing technology systems, and any outsourced third-party
providers.
The result of capturing all processes is an end-to-end process framework.
I define this through the characteristics of (1) capturing everything an
organization does and (2) being able to model processes from start to finish
as they traverse different parts of the organization.
Here are some characteristics of Process Inventory:
• Comprehensive Coverage: The goal of Process
Inventory is to capture everything that a business does
within an identified scope. This is achieved through an
interview process that aligns with the organizational
hierarchy as highlighted in Figure 2-3.
• Accuracy Through Attestation: Since Process
Inventory is constructed through the organizational
hierarchy, this provides ownership to review the accuracy
of the model after its initial creation and in each
subsequent maintenance review. Asking stakeholders for
formal attestation encourages them to pay attention to
the relevant details and ensure accuracy.
• Alignment with Strategy: The transparency of
processes enables a clear line of sight in how each process
contributes to the achievement of the organization’s
goals. It can be assessed in terms of its strategic
importance and performance metrics.
Digital Transformation Success 23

• Top-Down Decomposition: High-level activities as


seen by the CEO or senior leadership are made up of
subprocesses, and those subprocesses can be made up of
other subprocesses. This model provides the ability to
drill down to the appropriate level of detail given the
encountered problem.
• Models Current State and Future State: Capturing
Process Inventory is typically done on the current
inventory of processes, but it can be useful to show
future state processes when executing a transformation
program.
• Process Levels: Since this inventory is constructed by
leveraging an organizational hierarchy, there is no set
level for documenting process models, such as Level 3, as
different organizational hierarchies can be built at
different levels of depth.

Organizational Hierarchy

Head of Widget
Business

Pat

Process Inventory
Product Customer Widget Business
Sales Lead
Management Service Lead
Lead
Morgan Manage Sales Manage Products Manage Customer Service
Riley Hunter

Manage Sales Operations Conduct Product Research Manage Call Centers

Sales Operations Product Create Sales Report Generate Metrics Report Address Customer Questions
Call Center
Research
John Kyle Onboard Salesforce Conduct Customer Interviews Support Transaction Processing
Amy
Create Sales Material Summarize Opportunities Triage Customer Issues
Business Product Design
Development Complaints Support Sales Software
Alex Kim
Jane
Business Development Product Design Complaints Handling

Identify Prospects Manage Improvement Backlog Perform Initial Complaint Triage

Conduct Sales Call Create product design Research Complaint

Negotiate Contract Terms Plan enhancements Create and Propose Resolution

Close Contract Test and Validate Test and Validate

Perform Post Launch Review Conduct close out discussion

Figure 2-3. The Process Inventory Identification Process

Quality Is Paramount
Since Process Inventory serves as the common language for organizing
organizational knowledge, ensuring quality is crucial. These models contribute
to a repository of information interconnected with other process metadata.
When stakeholders begin utilizing this information in their roles, encountering
significant quality errors can undermine their confidence in the effort.
Overcoming negative perceptions of poor quality can be challenging.
24 Chapter 2 | Overview of the Process Inventory Framework

For each model, I will outline an approach to construction that includes


multiple quality review points and stakeholder sign-offs. Adopting these
quality checkpoints is of utmost importance to prevent costly or fatal
mistakes. It is considered a best practice to conduct internal standards
alignment reviews before seeking stakeholder attestation, thereby avoiding
the need for them to re-attest if quality issues are discovered.

Process Naming
One principle that is important when constructing the inventory of processes
is to provide clarity regarding the actions taking place. A good test for that is
whether someone not familiar with the business unit or functional area can
intuitively understand what the process accomplishes just by reading its name.
One effective way to achieve this is by adopting a verb + noun naming
convention. Since processes represent actions, the verb specifies the action,
and the noun represents the entity on which the action is performed. Examples
of good process names include “Open Account,” “Submit Payment,” and
“Document Dispute Resolution.” Additionally, when naming processes, it is
advisable to minimize the use of generic verbs, such as “Manage,” as they lack
precision in describing the action being taken.
Furthermore, it is crucial to use the language of the business when engaging
stakeholders as they are being asked to take ownership and be accountable
for performance. The process names should align with their existing vernacular.
For instance, if they refer to a process as “Onboard Client,” it is important
not to force them to call it “Open Account” just to match the terminology
used by other business units.
In my experience, process owners value consistency and readability that
standards bring while still allowing flexibility to align with their preferred
vernacular.

Maintenance
When embarking on this work, one of the initial concerns raised is how to
maintain the model’s accuracy. This is a significant question, considering the
constant changes that occur within many organizations, including the
deployment of large-scale programs and organizational restructuring.
Addressing this concern involves two key components.
Firstly, each process area must undergo periodic attestation, such as yearly,
wherein the process owner identifies and highlights any changes and
subsequently attests to the revised model. This ensures that updates are
captured and acknowledged. Periodic attestations are not a new concept as
they are used in several topics such as access controls, financial reports, and
compliance reporting just to name a few.
Random documents with unrelated
content Scribd suggests to you:
from taking the message to bring the troops back, was ordered by
the General to go off with the other married men and families.
Whatever may have been his own sentiments on the occasion, his
opinion was never asked, and he had but to obey.
11th.—We marched; being necessitated to leave all the servants
that could not walk, the Sirdar promising that they should be fed. It
would be impossible for me to describe the feelings with which we
pursued our way through the dreadful scenes that awaited us. The
road covered with awfully mangled bodies, all naked: fifty-eight
Europeans were counted in the Tunghee and dip of the Nullah; the
natives innumerable. Numbers of camp followers, still alive,
frostbitten and starving; some perfectly out of their senses and
idiotic. Major Ewart, 54th, and Major Scott, 44th, were recognised as
we passed them; with some others. The sight was dreadful; the
smell of the blood sickening; and the corpses lay so thick it was
impossible to look from them, as it required care to guide my horse
so as not to tread upon the bodies: but it is unnecessary to dwell on
such a distressing and revolting subject.
We hear that Mahommed Abkar Khan offered to escort the army
down, provided the troops laid down their arms; but that the
General went on, upon his own responsibility.
We arrived at the Tézeen fort, where we were well treated; and
where we found Lieut. Melville, 54th. He had, in guarding the colour
of his regiment, received five severe wounds. He had fortunately
seven rupees about him; these he gave to an Affghan to take him to
the Sirdar, who dressed his wounds with his own hands, applying
burnt rags; and paid him every attention.
12th.—We went to Seh Baba; and thence out of the road,
following the bed of the river, to Abdoollah Khan's fort. We passed
our last gun, abandoned, with poor Dr. Cardew's body lying on it,
and three Europeans close by it.
During the march, we were joined by Mr. Magrath, surgeon of the
37th N. I., and six men of the 44th. He had been wounded and
taken prisoner on the 10th, whilst endeavouring to rally a party of
some forty or fifty irregular cavalry, and bring them to the assistance
of the unfortunate wounded men, who were being butchered at the
bottom of the Huft Kohtul. On his coming up with this party, and
again ordering them to halt, to his great disgust he found Khoda
Bukh Khan, a Ghilzye chief, amongst them; to whom they were
apologising for not having gone over the day previous, as their
comrades had done. Mr. Magrath had several narrow escapes; and,
when surrounded by Ghilzye footmen with their long knives drawn,
owed his life in a great measure to an Affghan horseman, who
recognised him as having shown some little kindness to some of his
sick friends at Cabul.
At night we had snow.
Our whole party, ladies and gentlemen, crammed into one room;
one side of which was partitioned off with mats and filled with grain.
Here an old woman cooked chupatties for us, three for a rupee; but,
finding the demand great, she soon raised the price to a rupee each.
13th.—We travelled over mountain paths, where the camels found
it difficult to get on with the kajavas, till we arrived at Jugdaluk: near
the Ghavoy there had been fearful slaughter, principally of
Europeans.
We found Gen. Elphinstone, Brig. Shelton, and Capt. Johnson here
in tents.
Having brought our party safe to Jugdaluk, I now return to the
proceedings of our unfortunate army; taking up the tale at the
period when the ladies and their party took protection. On the 9th a
round Affghan tent was pitched for the ladies; and we felt the
courtesy of the sirdars, who slept in the open air to give us shelter,
even such as it was, for the wind blew in in every direction.
Immediately after our departure the irregular horse, with the
exception of about eighty men, went over in a body to the Sirdar;
and as they were afterwards seen in company with a body of
Affghan horse at about a mile distance, there was an attack from
them apprehended: all was consternation. Several of our Sipahees
absented themselves during the day, also a number of camp
followers. A message was sent to Mahommed Akbar Khan, and a
hope expressed that he would not favour the desertion of the
troops; and he promised that all going over to him should be shot,
which was immediately made known to the men. One of the Mission
chuprassies was caught in the act of going off, and shot.
Lieut. Mackay, assistant to Capt. Johnson, was sent in the
afternoon to the Sirdar (to the fort where the ladies were), for the
purpose of being the bearer of a letter to Gen. Sale at Jellalabad, to
order him to evacuate his position. This letter was written by Major
Pottinger.
All the dhooley bearers either deserted or were murdered the first
day.
The whole of the camels and yaboos have been either taken by
the enemy or plundered by our no less lawless camp followers and
soldiers.
The greatest confusion prevailed all day; and anxiety and
suspense for the ultimate fate of the army was intense; all expecting
that if in a few hours they were not deprived of life by cold and
hunger, they would fall by the knives of the Affghans; which, had
they been then attacked, must indubitably have occurred; for on the
return of the troops after their set-out in the morning, commanding
officers had great difficulty in collecting sixty files a corps: but even
of these many could scarcely hold a musket; many died of cold and
misery that night. To add to their wretchedness, many were nearly,
and some wholly, afflicted with snow blindness.
10th.—No sooner was it light than the usual rush to the front was
made by the mixed rabble of camp followers, Sipahees, and
Europeans in one huge mass. Hundreds of poor wretches, unable to
seize any animals for themselves, or despoiled by stronger persons
of those they had, were left on the road to die or be butchered.
After much exertion, the advance, consisting of the 44th, the only
remaining six-pounder, and about fifty files of the 5th cavalry,
managed to get ahead of the crowd. The Affghans were appearing
on the hills early: on arriving at the Tunghee Tareekee, a narrow
gorge about ten feet wide and two miles distant from their last
ground, Capt. Johnson was sent with the advance; the heights were
taken possession of by the enemy; who fired down incessantly on
the road, from which they were inaccessible. The snow increased in
depth as the army advanced. There is a gradual ascent all the way
from Khoord Cabul to Kubber-i-Jubhar, a distance of five miles; the
progress was necessarily slow, and many poor fellows were shot.
After getting through the pass, not above fifty yards in length,
they proceeded to Kubber-i-Jubhar; where they halted for their
comrades.
Latterly no Affghans had been seen, except at a distance; the
horror of our people was therefore the greater when a few
stragglers from the rear came up, and reported themselves as the
remnant of the rear column, almost every man of which had been
either killed or wounded: Capt. Hopkins had his arm broken by a
musket ball. There was now not a single Sipahee left of the whole
Cabul force.
A desperate attack had been made by a body of Affghans, sword
in hand: our men made no resistance, but threw away their arms
and accoutrements; and fell an easy prey to our barbarous and
bloodthirsty foe.
The rear-guard was composed of the 54th regiment. On arriving
at the narrow pass called Tunghee Tareekee, or "the dark pass," a
turn in the road shut out from their sight the enemy, who had
followed close on their heels, but on whom they had received strict
orders not to fire; although the Ghilzyes, from the heights and
ravines, had kept up a sharp discharge, killing many Sipahees and
camp followers, and cutting up all wounded and sick left behind. On
arriving at the above-mentioned pass, the turn in the road allowed
the Ghilzyes to close up; and a general attack was made on all sides:
hundreds of Affghans rushing down from the rocks and hills cut to
pieces their now reduced regiment. Here Major Ewart, commanding
54th, had both his arms broken by bullets from the Juzails; Lieut.
Morrieson, the adjutant, was wounded; and Lieut. Weaver, of the
same corps, slightly. Lieut. Melville, on observing the Jemadar, who
carried the regiment's colour, wounded and dropping his charge,
seized it; and, after vainly attempting to tear it off the staff, to which
it was too firmly attached, made his way on foot (his horse having
been killed), with the colour in his hand. This made him a mark for
the enemy; and ere he had got out of the pass, being nearly, or
quite, the last man of the column, or rather rabble, he received a
spear wound in his back, which threw him on his face: ere well able
to rise, a severe sword-cut in the head again laid him prostrate; but
he contrived to crawl as far as the fast retreating column; when
again the knife of an Affghan wounding him in the neck, and a spear
in the chin, he gave up all for lost. He was now surrounded by a
dozen Ghilzyes; and no man, save the dead and dying, near him;
when the enemy, observing a box of treasure on the opposite side of
the pass, left him, for the purpose of rifling the money, either
supposing they had already killed him, or intending to return when
they had secured the more valuable booty. This pause gave Lieut.
Melville an opportunity of escaping and regaining the column; which,
although weak from his wounds, he availed himself of; and by going
through the snow in the ravines, he contrived to reach the column;
where a pony without an owner, or saddle of any description,
presenting itself, he scrambled on to it; and, with the assistance of a
Mehter, gained the centre of the column, where the 44th and one
gun still kept some order. Lieut. Melville was tied on the gun, and
was told by Gen. Elphinstone, that he should be sent over to the
charge of the Sirdar, Mahommed Akbar Khan, on reaching Tézeen,
or at any opportunity of going.
On a report of a large body of horse being observed in the rear,
the gun was ordered there; and Lieut. Melville was placed on a bank
on the road-side. The column passed on; and he was expecting the
fate of the other poor fellows who had fallen; when, providentially
for him, a horseman rode up, who had known him in cantonments,
and who strapped him on his horse, and took him over to the party
of horsemen, consisting of Mahommed Akbar Khan and his
followers; who received him most kindly, and, binding up his
wounds, gave him a loonghee, his regimental cap being cut to
pieces.
The loonghee is the cloth worn as a turban commonly by the
Affghans, and is generally of blue check with a red border: those
worn by the Khyberries are much gayer, and have a large admixture
of yellow.
Melville gave to Omer Khan, the horseman who saved his life,
seven rupees, being all the property he possessed.
Every particle of baggage was gone.
The small remnant of the army consisted of about seventy files of
the 44th, fifty of the 5th cavalry, and 1 six-pounder gun. Observing a
body of cavalry in their rear, they determined to bring their solitary
gun into position, and make a last effort for existence. Finding it was
again Mahommed Akbar Khan, Capt. Skinner (Assist.-Com.-Gen.) by
direction of the General, went over, under escort, to him; to
remonstrate on the attack made on our troops after a treaty had
been entered into for our protection. He replied, he regretted it, he
could not control the Ghilzyes (the inhabitants of this part of the
country) with his small body of horse, about 300; but that as the
remnant of our troops was merely a few Europeans, he would
guarantee their safety, and that of all the European officers, to
Jellalabad, if the General would conduct them all disarmed, whilst
the Affghans were to have the use of their weapons. He said his
motives for this were, that should they bring their arms with them,
his own followers would be afraid of treachery. To this proposition
the General would not assent.
Mackay returned with Skinner from the Sirdar, as the road to
Jellalabad was said to be unsafe.
The troops continued their fearful march: the remnant of the
camp followers, with several wounded officers, went ahead: for five
miles they saw no enemy: all who could not walk were necessarily
left behind. They descended a long steep descent to the bed of the
Tézeen Nullah. At this dip the scene was horrible: the ground was
covered with dead and dying, amongst whom were several officers:
they had been suddenly attacked and overpowered. The enemy here
crowded from the tops of the hills in all directions down the bed of
the Nullah, through which the route lay for three miles; and our men
continued their progress through an incessant fire from the heights
on both sides, until their arrival in the Tézeen valley, at about half-
past four P.M.
The descent from the Huft Kohtul was about 2000 feet; and here
they lost the snow.
About 12,000 persons have perished!
A quarter of an hour after their arrival, the Sirdar and a party
came into the valley to a fort higher up belonging to his father-in-
law, Mahommed Shah Khan. A signal was made to his horsemen to
approach: two came, and Capt. Skinner, by the General's desire,
accompanied them to Mahommed Akbar Khan, to devise some
means of saving the remnant—about 4,000 people of all
descriptions.
Skinner returned at dusk; and brought back the same message as
from Kubber-i-Jubhar, regarding disarming the Europeans: and again
this was refused.
The General then decided, weak and famished as the troops were,
and without any prospect of procuring provisions at Tézeen, to
march at seven in the evening (they had left Khoord Cabul, fifteen
miles from Tézeen, half-past six A.M.), and proceed, if possible,
through the Jugdaluk pass by eight or nine the next morning. In this
consisted their only chance of safety; for, should the enemy obtain
intimation of their approach, the pass would be occupied, and the
object defeated. Johnson pointed out to the General that
Mahommed Akbar Khan and his party could, by means of a short cut
across the mountains, start long after them, and arrive before them,
ready to oppose them.
Jugdaluk is about twenty-four miles from Tézeen; the pass about
two miles long, very narrow, and commanded on both sides by high
and precipitous hills.
At Tézeen Gen. Elphinstone received a note in cypher from Capt.
Conolly, warning him that Mahommed Akbar Khan had quitted Cabul,
with the avowed intention of getting into his hands the person of the
General, and all the married people with their families.
A message was sent to Mahommed Akbar Khan that they were
going to march to Seh Baba, seven miles from Tézeen (this place is
sometimes called Tukeea-i-Fakeer): the road lies down the bed of a
Nullah, with high hills on either side. The place is only remarkable
from having a few trees and a grave or two under them; and from
the latter I believe it takes its name.
The camp followers having been the bane of this unfortunate
army, they hoped to move off quietly and leave them behind; but no
sooner did they start, than they found that all who were able to
stand were accompanying them. They left their remaining gun
behind; and Dr. Cardew, who was mortally wounded at the dip into
the Tézeen Nullah, was laid on the carriage to await death, which
was rapidly approaching: he was found dead by Mahommed Akbar's
people the next morning.
The night was fine and moonlit, and they reached Seh Baba about
midnight; here a few shots were fired on them; and the rear being
attacked, the whole remains of the 44th, with the exception of about
nine files to form the advance, were ordered there; and thus the
column remained until their arrival at Jugdaluk; their progress being
again impeded by that evil which always attends Indian armies, the
camp followers; who, if a shot is fired in advance, invariably fall
back; and if in rear, rush to the front.
11th.—From Seh Baba the road turns off sharp to the right over
the mountains to Jugdaluk; and across the Nullah is seen the short
road to Cabul, but which cannot be travelled by guns or camels.
At Seh Baba Dr. Duff (the Surgeon-General to the forces in
Affghanistan), who had had his hand cut off with a penknife at
Tézeen, in consequence of a severe wound, was from weakness
obliged to lag behind, and was two days afterwards found murdered.
Bareekub is three miles from Seh Baba: there is a clear stream of
water, and several caves cut in the rocks. Here our force observed a
number of people in the caves; with whom they did not interfere, as
they did not molest them. They eventually fired some volleys on the
rear.
At daybreak the advance arrived at Killa Sung, about seven miles
from Seh Baba, where there are some streams of water: this is the
general encamping ground, though very confined, and commanded
by hills all round.
They proceeded about half a mile further on, and then halted,
until the rear-guard should arrive; but they, having been much
molested on the road, did not arrive for two hours. On their first
arrival not an Affghan was to be seen; but shortly several made their
appearance on the hills, and the number continued every moment to
increase. Not a drop of water was procurable; nor would they get
any until their arrival at Jugdaluk. They had marched for twenty-four
hours consecutively, and had still ten miles to go before they could
hope for rest. On being joined by the rear-guard they continued
their march; the enemy in small numbers watching every
opportunity to murder stragglers from the column.
At two miles from Jugdaluk the descent into the valley
commences.
The hills on each side of the road were occupied by the enemy,
who kept firing from their long juzails; and again the road was
covered with dead and dying, as they were in such a mass that
every shot told.
On arrival in the valley, a position was taken up on the first height
near some ruined walls. As scarcely any Europeans of the advance
now remained, and the enemy were increasing, the General called
all the officers (about twenty) to form line and show a front: they
had scarcely done so when Capt. Grant, Assistant-Adjutant-General,
received a ball through the cheek which broke his jaw.
On the arrival of the rear-guard, followed up by the enemy, the
latter took possession of two heights close to our position: on which
our force went for security within the ruined walls. The men were
almost maddened with hunger and thirst: a stream of pure water ran
within 150 yards of the position, but no man could go for it without
being massacred.
For about half an hour they had a respite from the fire of the
enemy, who now only watched their proceedings.
The General desired Johnson to see if there were any bullocks or
camels procurable amongst the followers: he obtained three
bullocks, which were killed, served out, and devoured instantly,
although raw, by the Europeans.
A few horsemen coming in sight, they signed for one to approach:
he did so, and on being questioned what chief was present, said
Mahommed Akbar Khan. A message was sent to the Sirdar by the
General to know why they were again molested: the chief replied, he
wished to converse with Skinner, who immediately accompanied the
messenger. This was about half past three P.M. of the 11th.
After marching for thirty hours they lay down on the ground worn
out by cold, hunger, thirst, and fatigue: but scarcely had Skinner
taken his departure, when volley after volley was poured into the
enclosure where they were resting. All was instant confusion, and a
general rush took place outside the walls; men and cattle all huddled
together, each striving to hide himself from the murderous fire of the
enemy.
At this time twenty gallant men of the 44th made a simultaneous
rush down the hill, to drive the enemy off the heights they occupied:
in this they were successful; for, supposing they were followed by
the rest, the foe took to flight ere our men could reach their
position.
In about a quarter of an hour, as so small a party would not admit
of any division, this party was recalled. They again entered within
the broken walls; and instantly our inveterate foes were in their
former position dealing death amongst them.
About 5 o'clock Skinner returned with a message that the Sirdar
wished to see the General, Brig. Shelton, and Johnson; and if they
would go over to confer with him, he would engage to put a stop to
any further massacre, and also to give food to our troops: and on
condition of their remaining with him as hostages for Gen. Sale's
evacuation of Jellalabad, he would escort all the small remaining
party in safety.
Mahommed Shah Khan, father-in-law to the Sirdar, and whose
daughter is with the Dost at Loodianah, is one of the principal
Ghilzye chiefs: he came at dusk with an escort to receive them; and
they started in the confident hope that some arrangement would be
entered into to save the lives of the remainder of the army. The
General and the above-mentioned officers proceeded to the top of
the valley for about two miles, and found the Sirdar and his party in
bivouac: nothing could exceed the kind manner in which they were
received. The chief, on hearing they had not tasted food for forty-
eight hours, had a cloth spread on the ground; and a good pillau
and other dishes, as also tea, were quickly brought; and they formed
a circle round it, and all ate out of the same dish.
Their hunger, though great, was not to be compared to their
thirst, which had not been quenched for two days.
The party consisted of the Sirdar, Mahommed Akbar Khan,
Mahommed Shah Khan, Abdool Ghyas Khan (son of Jubhar Khan),
and a young lad called Abdool Hakeem Khan, nephew to the Sirdar.
The attention of the Sirdar and his party was excessive; and after
dinner they sat round a blazing fire, and conversed on various
subjects. The General requested that Mahommed Akbar Khan would
early in the morning forward provisions to the troops, and make
arrangements for supplying them with water: all which he faithfully
promised to do.
The General was anxious for permission to return to his troops;
and offered to send Brig. Anquetil, should the Sirdar require an
officer in his stead. Johnson, by the General's desire, pointed out to
the Sirdar the stigma that would attach to him as commander of the
force, were he to remain in a place of comparative security, whilst
such danger impended over the troops. To this the Sirdar would not
consent. At about 11 P.M., the Sirdar promised he would early in the
morning call the chiefs of the pass together, to make arrangements
for a safe escort: he then showed them into a small tent, where,
stretched on their cloaks, they found relief in sleep.
Our unfortunate force at Jugdaluk this day consisted of 150 men
of the 44th; 16 dismounted horse artillery men; 25 of the 5th
cavalry. Not a single Sipahee with arms, no spare ammunition, and
the few rounds in pouch had been taken from the killed.
12th.—The English officers arose at sunrise, and found the Sirdar
and his party were up. They showed them the same civility as over
night; two confidential servants of the chief were appointed to wait
on them; and they were warned not to attempt to leave the tent
without one of these men, lest they should be maltreated or insulted
by the Ghilzyes, who were flocking in to pay their respects to
Mahommed Akbar.
About 9 A.M., the chiefs of the pass and the country around
Soorkhab arrived. Soorkhab is about thirteen miles from Jugdaluk,
towards Jellalabad, and is the usual halting ground.
The chiefs sat down to discuss affairs. They were bitter in their
hatred towards us; and declared that nothing would satisfy them
and their men, but our extermination. Money they would not
receive. The Sirdar, as far as words could prove his sincerity, did all
in his power to conciliate them; and, when all other arguments
failed, reminded them that his father and family were in the power
of the British government at Loodianah; and that vengeance would
be taken on the latter if mercy were not showed to the British in
their power.
Mahommed Shah Khan offered them 60,000 rupees on condition
of our force not being molested. After some time they took their
departure to consult with their followers; and Mahommed Shah Khan
mentioned to Johnson that he feared the chiefs would not, without
some great inducement, resist the temptation of plunder and murder
that now offered itself: and wound up the discourse by asking if we
would give them two lakhs of rupees for a free passage. On this
being explained to the General, he gave his consent; and it was
made known to Mahommed Shah Khan, who went away and
promised to return quickly.
The General again begged of the Sirdar to permit him to return to
his troops; but without avail.
Johnson, by the General's desire, wrote early in the day to
Skinner, to come to the Sirdar. This letter and two others, it is to be
feared, he never received. A report was brought in that Skinner was
wounded, but not dangerously; the Sirdar expressed much sorrow;
poor Skinner died of his wound the same day.
Until 12 o'clock crowds of Ghilzyes with their respective chiefs,
continued to pour in from the surrounding country to make their
salaams to Mahommed Akbar Khan, to participate in the plunder of
our unfortunate people, and to revel in the massacre of the
Europeans. From their expressions of hatred towards our whole
race, they appeared to anticipate more delight in cutting our throats
than in the expected booty. However, on a hint from the Sirdar, they
changed the language, in which they conversed, from Persian to
Pushtoo, which was not understood by our officers.
The Sirdar, to all appearance, whilst sitting with Johnson,
endeavoured to conciliate them; but it very probably was only done
as a blind to hide his real feelings.
In two instances, the reply of the chiefs was,—"When Burnes
came into this country, was not your father entreated by us to kill
him; or he would go back to Hindostan, and at some future day
bring an army and take our country from us? He would not listen to
our advice, and what is the consequence? Let us now, that we have
the opportunity, take advantage of it; and kill those infidel dogs."
At about 12, the Sirdar left them, and went on the top of a hill in
rear of the British bivouac. He did not return till sunset; and in reply
to the anxious inquiry when Mahommed Shah Khan would return,
they were always told immediately. Frequent assurances had been
given that the troops had been supplied with food and water; but
subsequently they learnt that neither had been given them in their
dire necessity.
The Sirdar returned at dusk; and was soon followed by
Mahommed Shah Khan, who brought intelligence that all was finally
and amicably arranged for the safe conduct of the troops to
Jellalabad. The Sirdar said he would accompany them in the morning
early. By the General's request, Johnson wrote to Brig. Anquetil to
have the troops in readiness to march by 8 o'clock: he had also
commenced a letter to Gen. Sale to evacuate Jellalabad (this being
part of the terms). Suddenly, and before the first note was sent off,
much musketry was heard down the valley in the direction of the
troops; and a report was brought in that the Europeans were moving
off through the pass followed by the Ghilzyes. All was consternation.
At first the Sirdar suggested that he and the officers should follow
them: in this the General concurred. In a few minutes the Sirdar
changed his mind; said he feared their doing so would injure the
troops, by bringing after them the whole horde of Ghilzyes then
assembled in the valley. He promised to send a confidential servant
to Meer Afzul Khan at Gundamuk (two miles beyond Soorkhab) to
afford them protection; and agreed to start with them at midnight,
as being mounted they would overtake the others before daybreak.
When about to separate for the night, the Sirdar again altered the
time of departure to the first hour of daylight. Remonstrances were
of no avail; and our party were too completely in the power of the
enemy, to persist in what they had not the power to enforce.
Mahommed Akbar Khan told Johnson, after Mahommed Shah
Khan went out to consult with the chiefs of the pass, that the latter
were dogs and no faith could be placed in them; and begged
Johnson would send for three or four of his most intimate friends,
that their lives might be saved in the event of treachery to the
troops. Gladly as he would have saved his individual friends, he was
under the necessity of explaining to the Sirdar that a sense of
honour would prevent the officers deserting their men at a time of
such imminent peril. The Sirdar also proposed, that in the event of
the Ghilzyes not acceding to the terms, he would himself, at dusk,
proceed with a party of horsemen to the foot of the hill where our
troops were; and, previous orders being sent to the commanding
officer for all to be ready, he would bring every European away in
safety, by each of his horsemen taking up one behind him: the
Ghilzyes would not then fire upon them, lest they should hit him or
his men. But he would not allow a single Hindostanee to follow; as
he could not protect 2000 men (the computed number).—Johnson
interpreted all this to the General: but it was deemed impracticable;
as from past experience they knew how impossible it was even to
separate the Sipahees from the camp followers. Four or five times
during the day they heard the report of musketry in the direction of
our troops; but they were always told that all fighting had ceased.
This was subsequently proved to be a gross falsehood. Our troops
were incessantly fired upon from the time that the General and the
other officers quitted them to the time of their departure, and
several hundreds of officers and men had been killed or wounded.
The remainder, maddened with cold, hunger, and thirst, the
communication between them and the General cut off, and seeing
no prospect but certain death before them by remaining in their
present position, determined on making one desperate effort to
leave Jugdaluk. Snow fell during the night.
My narrative now continues from information furnished by a friend
remaining with the remnant of this ill-fated army.—They halted this
day at Jugdaluk, hoping to negotiate an arrangement with
Mahommed Akbar Khan and the Ghilzye chiefs, as before stated: but
the continual firing, and frequent attempts made by the enemy to
force them from their position during the day, but too well indicated
that there was little or no chance of negotiations being effectual to
quell hostilities, and admit of their resuming their march in safety:
on the contrary, there appeared an evident determination still to
harass their retreat to the very last.
Near the close of the day the enemy commenced a furious attack
from all sides. The situation of our troops at this time was critical in
the extreme: the loss they sustained in men and officers had been
great during the day, and the survivors had only been able to obtain
a scanty meal of camel's flesh: even water was not procurable
without the parties proceeding for it being exposed to a heavy fire.
The men, under all this suffering, perishing with cold at their post,
bravely repelled the enemy; and would then have followed them
from under the dilapidated walls had they been permitted to do so.
During this conflict Capt. Souter of the 44th, anxious to save the
colours of his regiment, tore one of them from its staff, and folding it
round his person, concealed it under the poshteen he wore: the
other was in like manner appropriated by Lieut. Cumberland; but
finding that he could not close his pea-coat over it, he reluctantly
entrusted it to the care of the Acting Quartermaster-Sergeant of the
44th regiment.
Great anxiety prevailed amongst the troops, caused by the
continued absence of Gen. Elphinstone and Brigadier Shelton, the
two seniors in command. It was resolved, as they did not return, to
resume their march as soon as the night should shroud them from
observation; and Brig. Anquetil, now in command, ordered the
troops to fall in at eight o'clock: but before the men could take the
places assigned to them, the camp followers, who were still
numerous, crowded upon them as usual. At length between 8 and 9
o'clock they took their departure; which was rendered a very trying
scene, from the entreaties of the wounded, amounting to seventy or
eighty, for whom there was no conveyance; and therefore, however
heartrending to all, they were necessarily abandoned, with the
painful conviction that they would be massacred in cold blood,
defenceless as they were, by the first party of Ghilzyes that arrived.
The enemy, who seem to have been aware of the intended
removal, soon commenced an attack upon the straggling camp
followers: and a number of Affghans, favoured by the darkness of
the night, stole in amongst the followers that were in column, whom
they quietly despatched, and proceeded to plunder. These daring
men, however, were nearly all cut up or bayonetted by the enraged
soldiery; who shortly after came upon an encampment of the
enemy; in passing which they were saluted with a heavy fire,
followed up by a sally upon the camp followers, as usual.
They proceeded on until they came to a gorge, with low steep hills
on either side, between which the road passed, about two miles
from Jugdaluk. Here two barriers had been thrown across the road,
constructed of bushes and branches of trees. The road, which had
been flooded, was a mass of ice, and the snow on the hills very
deep. The enemy, who had waited for them in great force at this
spot, rushed upon the column, knife in hand. The camp followers
and wounded men fell back upon the handful of troops for
protection; thus rendering them powerless, and causing the greatest
confusion; whilst the men, in small detached parties, were
maintaining conflicts with fearful odds against them.
In this conflict the Acting Quartermaster-Sergeant fell: and in the
confusion, caused by an overwhelming enemy pressing on the rear
in a night attack, it is not surprising that it was found impossible to
extricate the colour from the body of the fallen man; and its loss was
unavoidable. The disorder of the troops was increased by a part of
them, the few remaining horsemen, galloping through and over the
infantry in hopes of securing their own retreat to Jellalabad. The
men, maddened at being ridden over, fired on them; and it is said
that some officers were fired at; but that rests on doubtful
testimony. When the firing slackened, and the clashing of knives and
bayonets had in some measure ceased, the men moved on slowly;
and on arriving at the top of the gorge were able to ascertain the
fearful extent of the loss they had sustained in men and officers. Of
the latter Brigadier Anquetil and above twenty others were missing.
The troops now halted unmolested for an hour; during which time a
few stragglers contrived to join them.
The country being now of a more open description, our small force
suffered less annoyance from the fire of the enemy: but the
determination of the men to bring on their wounded comrades
greatly retarded their marching; and from the troopers having
proceeded onwards the wounded could not be mounted behind
them: thus their pace did not exceed two miles in the hour. From
time to time sudden attacks were made on the rear; particularly in
spots where the road wound close under the foot of the hills, and
there a sharp fire was sure to be met with. In this manner they went
on till they reached the Soorkhab river, which they forded below the
bridge at 1 A.M. on the 13th, being aware that the enemy would
take possession of it, and dispute the passage. Whilst fording the
river a galling fire was kept up from the bridge: here Lieut. Cadett of
the 44th and several men were killed and wounded.
13th.—From Soorkhab the remnant of the column moved towards
Gundamuk: but as the day dawned the enemy's numbers increased;
and unfortunately daylight soon exposed to them how very few
fighting men the column contained. The force now consisted of
twenty officers, of whom Major Griffiths was the senior, fifty men of
the 44th, six of the horse artillery, and four or five Sipahees.
Amongst the whole there were but twenty muskets; 300 camp
followers still continued with them.
Being now assailed by an increased force, they were compelled to
quit the road, and take up a position on a hill adjoining. Some
Affghan horsemen being observed at a short distance were
beckoned to. On their approach there was a cessation of firing:
terms were proposed by Capt. Hay, to allow the force to proceed
without further hostilities to Jellalabad. These persons not being
sufficiently influential to negotiate, Major Griffiths proceeded with
them to a neighbouring chief for that purpose; taking with him Mr.
Blewitt, formerly a writer in Capt. Johnson's office, who understood
Persian, that he might act as interpreter.
Many Affghans ascended the hill where our troops awaited the
issue of the expected conference; and exchanges of friendly words
passed between both parties. This lasted upwards of an hour; but
hostilities were renewed by the Affghans, who snatched at the fire-
arms of the men and officers. This they of course resisted; and
drove them off the hill: but the majority of the enemy, who occupied
the adjoining hills commanding our position, commenced a galling
fire upon us. Several times they attempted to dislodge our men from
the hill, and were repulsed: until, our ammunition being expended,
and our fighting men reduced to about thirty, the enemy made a
rush, which in our weak state we were unable to cope with. They
bore our men down knife in hand; and slaughtered all the party
except Capt. Souter and seven or eight men of the 44th and artillery.
This officer thinks that this unusual act of forbearance towards him
originated in the strange dress he wore: his poshteen having opened
during the last struggle exposed to view the colour he had wrapped
round his body; and they probably thought they had secured a
valuable prize in some great bahadur, for whom a large ransom
might be obtained.
Eighteen officers and about fifty men were killed at the final
struggle at Gundamuk. Capt. Souter and the few remaining men
(seven or eight) that were taken alive from the field were, after a
detention of a month in the adjoining villages, made over to
Mahommed Akbar Khan and sent to the fort of Buddeeabad in the
Lughman valley, where they arrived on the 15th of February.
THE CAPTIVITY.
We must now return to the General and his party. At daybreak on
the 13th the Sirdar had again changed his mind; and instead of
following up the troops, he decided to move to the position they had
vacated, and remain there during the day; and should the ladies and
officers left at Khoord Cabul arrive in the evening, that all should
start the next morning over the mountains to the valley of Lughman,
north of Jellalabad. At 8 A.M., they mounted their horses; and with
the Sirdar and his party rode down the pass, which bore fearful
evidence to the last night's struggle. They passed some 200 dead
bodies, many of them Europeans; the whole naked, and covered
with large gaping wounds. As the day advanced, several poor
wretches of Hindostanees (camp followers, who had escaped the
massacre of the night before) made their appearance from behind
rocks and within caves, where they had taken shelter from the
murderous knives of the Affghans and the inclemency of the climate.
They had been stripped of all they possessed; and few could crawl
more than a few yards, being frostbitten in the feet. Here Johnson
found two of his servants: the one had his hands and feet
frostbitten, and had a fearful sword cut across one hand, and a
musket ball in his stomach; the other had his right arm completely
cut through the bone. Both were utterly destitute of covering, and
had not tasted food for five days.
This suffices for a sample of the sufferings of the survivors.
About four o'clock Sultan Jan (a cousin of the Sirdar) arrived with
the ladies and gentlemen; also Lieut. Melville of the 54th, and Mr.
Magrath, surgeon of the 37th, both of whom had been wounded
between Khoord Cabul and Tézeen. A large party of cavalry
accompanied Sultan Jan, both Affghan and our irregular horse, who
had deserted, as before mentioned.
14th.—We marched twenty-four miles to Kutz-i-Mahommed Ali
Khan: started at about 9 A.M.; the Sirdar with Gen. Elphinstone;
Brig. Shelton, and Capt. Johnson bringing up the rear.
We travelled over a dreadfully rough road: some of the ascents
and descents were fearful to look at, and at first sight appeared to
be impracticable. The whole road was a continuation of rocks and
stones, over which the camels had great difficulty in making their
way; and particularly in the ascent of the Adrak-Budrak pass, where
I found it requisite to hold tight on by the mane, lest the saddle and
I should slip off together.
Had we travelled under happier auspices, I should probably have
been foolish enough to have expressed fear, not having even a saces
to assist me. Still I could not but admire the romantic tortuous defile
we passed through, being the bed of a mountain torrent, which we
exchanged for the terrific pass I have mentioned, and which was
rendered doubly fearful by constant stoppages from those in front,
which appeared to take place at the most difficult spots.
At the commencement of the defile, and for some considerable
distance, we passed 200 or 300 of our miserable Hindostanees, who
had escaped up the unfrequented road from the massacre of the
12th. They were all naked, and more or less frostbitten: wounded,
and starving, they had set fire to the bushes and grass, and huddled
all together to impart warmth to each other. Subsequently we heard
that scarcely any of these poor wretches escaped from the defile:
and that driven to the extreme of hunger they had sustained life by
feeding on their dead comrades.
The wind blew bitterly cold at our bivouac; for the inhabitants of
the fort refused to take us in; stating that we were Kaffirs. We
therefore rolled ourselves up as warm as we could; and with our
saddles for pillows braved the elements. Gen. Elphinstone, Brig.
Shelton, and Johnson considered themselves happy when one of the
Affghans told them to accompany him into a wretched cowshed,
which was filled with dense smoke from a blazing fire in the centre
of the hut. These officers and Mr. Melville were shortly after invited
by Mahommed Akbar Khan to dine with him and his party in the fort.
The reception room was not much better than that they had left:
they had, however, a capital dinner, some cups of tea, and luxurious
rest at night; the room having been well heated by a blazing fire
with plenty of smoke, with no outlet for either heat or smoke, except
through the door and a small circular hole in the roof.
15th January.—A bitterly cold wind blowing, we started at 7 A.M.;
crossed two branches of the Punjshir river, which was not only deep,
but exceedingly rapid. The chiefs gave us every assistance:
Mahommed Akbar Khan carried Mrs. Waller over behind him on his
own horse. One rode by me to keep my horse's head well up the
stream. The Affghans made great exertions to save both men and
animals struggling in the water; but in spite of all their endeavours
five unfortunates lost their lives. We passed over many ascents and
declivities; and at about 3 P.M. arrived at Tighree, a fortified town in
the rich valley of Lughman; having travelled twenty miles over a
most barren country, without a blade of grass or drop of water until
we approached Tighree. Our route lay along a tract of country
considerably higher than Lughman, with scarcely a footpath visible
the whole way. The road was good for any kind of carriage. We
passed over the Plain of Methusaleh; and saw at a short distance the
Kubber-i-Lamech, a celebrated place of pilgrimage, about two miles
from Tighree and twenty-five from Jellalabad.
The Sirdar desired the General, the Brigadier, and Johnson to take
up their quarters with him, whilst the ladies and the other gentlemen
were located in another fort.
A great number of Hindu Bunneahs reside at Tighree. We went to
the fort of Gholab Moyenoodeen, who took Mrs. Sturt and myself to
the apartments of his mother and wife. Of course we could not
understand much that they said; but they evidently made much of
us, pitied our condition, told us to ask them for any thing we
required, and before parting they gave us a lump of goor filled with
pistaches, a sweetmeat they are themselves fond of.
16th.—Halted. They tell us we are here only thirty miles from
Jellalabad. It being Sunday, we read prayers from a Bible and Prayer
Book that were picked up on the field at Bhoodkhak. The service
was scarcely finished when a clannish row commenced. Some tribes
from a neighbouring fort who had a blood feud with the chiefs with
us came against the fort: a few juzails were fired; there was great
talking and noise; and then it was all over.
17th.—Early in the morning we were ordered to prepare to go
higher up the valley. Thus all hopes (faint as they were) of going to
Jellalabad were annihilated; and we plainly saw that, whatever might
be said, we were virtually prisoners, until such time as Sale shall
evacuate Jellalabad, or the Dost be permitted by our government to
return to this country.
We had a little hail this morning; and shortly after, at about nine
o'clock, we started, and travelled along the valley, which was a
continuation of forts, until we arrived at Buddeeabad (about eight or
nine miles): it is situated almost at the top of the valley, and close to
the first range of hills towards Kaffiristan.
Six rooms, forming two sides of an inner square or citadel, are
appropriated to us; and a tykhana to the soldiers. This fort is the
largest in the valley, and is quite new; it belongs to Mahommed Shah
Khan: it has a deep ditch and a fausse-braye all round. The walls of
mud are not very thick, and are built up with planks in tiers on the
inside. The buildings we occupy are those intended for the chief and
his favourite wife; those for three other wives are in the outer court,
and have not yet been roofed in. We number 9 ladies, 20 gentlemen,
and 14 children. In the tykhana are 17 European soldiers, 2
European women, and 1 child (Mrs. Wade, Mrs. Burnes, and little
Stoker).
Mahommed Akbar Khan, to our horror, has informed us that only
one man of our force has succeeded in reaching Jellalabad (Dr.
Brydon of the Shah's force: he was wounded in two places). Thus is
verified what we were told before leaving Cabul; "that Mahommed
Akbar would annihilate the whole army, except one man, who should
reach Jellalabad to tell the tale."
Dost Mahommed Khan (the brother of Mahommed Shah Khan) is
to have charge of us. Our parties were divided into the different
rooms. Lady Macnaghten, Capt. and Mrs. Anderson and 2 children,
Capt. and Mrs. Boyd and 2 children, Mrs. Mainwaring and 1 child,
with Lieut. and Mrs. Eyre and 1 child, and a European girl, Hester
Macdonald, were in one room; that adjoining was appropriated for
their servants and baggage. Capt. Mackenzie and his Madras
Christian servant Jacob, Mr. and Mrs. Ryley and 2 children, and Mr.
Fallon, a writer in Capt. Johnson's office, occupied another. Mrs.
Trevor and her 7 children and European servant, Mrs. Smith, Lieut.
and Mrs. Waller and child, Mrs. Sturt, Mr. Mein, and I had another. In
two others all the rest of the gentlemen were crammed.
It did not take us much time to arrange our property; consisting of
one mattress and resai between us, and no clothes except those we
had on, and in which we left Cabul.
Mahommed Akbar Khan, Sultan Jan, and Ghoolam Moyenoodeen
visited us. The Sirdar assured me we were none of us prisoners;
requested that we would make ourselves as comfortable as
circumstances would admit of; and told us that as soon as the roads
were safe we should be safely escorted to Jellalabad. He further
informed me that I might write to Sale; and that any letters I sent to
him he would forward. Of this permission I gladly took advantage to
write a few guarded lines to say that we were well and safe.
19th.—We luxuriated in dressing, although we had no clothes but
those on our backs; but we enjoyed washing our faces very much,
having had but one opportunity of doing so before, since we left
Cabul. It was rather a painful process, as the cold and glare of the
sun on the snow had three times peeled my face, from which the
skin came off in strips.
We had a grand breakfast, dhall and radishes; the latter large hot
ones that had gone to seed, the former is a common pulse eaten by
the natives: but any change was good, as we find our chupatties
made of the coarse ottah any thing but nice. Ottah is what in
England is called pollard; and has to be twice sifted ere it becomes
flour. The chupatties are cakes formed of this ottah mixed with
water, and dried by standing by the fire set up on edge. Eating these
cakes of dough is a capital recipe to obtain the heartburn. We parch
rice and barley, and make from them a substitute for coffee. Two
sheep (alias lambs) are killed daily; and a regular portion of rice and
ottah given for all. The Affghans cook; and well may we exclaim with
Goldsmith, "God sends meat, but the devil sends cooks;" for we only
get some greasy skin and bones served out as they are cooked,
boiled in the same pot with the rice, all in a lump. Capt. Lawrence
divides it; and portions our food as justly as he can. The chupatty is
at once the plate and bread: few possess other dinner-table
implements than their fingers. The rice even is rendered nauseous
by having quantities of rancid ghee poured over it, such as in India
we should have disdained to use for our lamps.
21st.—The weather cleared up at noon. Major Pottinger is said to
have received information that Zeman Shah Khan and all the
Dooranees have surrendered to Shah Shoojah; and that his Majesty
was at the bottom of the whole affair to turn us out of Affghanistan.
22nd.—I heard from Sale, dated the 19th. Our force can hold out
at Jellalabad for six months. It is calculated that Col. Wylde must be
at Jellalabad to-day with 5000 men. Gen. Pollock is coming with an
army across the Punjab.
We hear that Mahommed Akbar has been offered the Sirdar-i-
sirdaranee; but has refused it. He is said to be gone, or going, to the
Khyber.
23rd, Sunday.—After prayers Mahommed Akbar Khan and Sultan
Jan paid us a visit: the latter took charge of a letter from me for
Sale. He told me that Abdool Guffoor Khan says that Sale is quite
well.
They say that Shah Shoojah demanded Conolly and three other
hostages to be given up to him to put them to death; but Zeman
Shah Khan refused.
24th.—A day or two ago the Sirdar sent some chintz to be divided
amongst us. A second quantity was to-day given out; and we are
working hard that we may enjoy the luxury of getting on a clean suit
of clothes. There are very few of us that are not covered with
crawlers; and, although my daughter and I have as yet escaped, we
are in fear and trembling.
It is now said that the General gave Anderson's horse permission
to go over to the enemy: a circumstance that does not at all agree
with his conduct on the day following our taking protection; when he
wished for Anderson's return lest the men should desert.
Dost Mahommed Khan took Mrs. Trevor's boys and some of the
gentlemen out walking in the sugar-cane fields near the fort, which
they enjoyed very much.
25th.—The Sirdar sent eight pieces of long cloth to be divided
amongst us. I fancy he is generous at little cost; and that it is all a
part of the plunder of our camp. He is said to have received letters
from the Khyber stating that our force has been defeated there; two
guns taken, and some treasure: and that Mackeson is shut up in Ali
Musjid with 300 men.
26th.—As soon as the Bukhraeed is over, Shah Shoojah is to send
4000 men, and all the guns we left in Cabul, against Jellalabad. A
Mussulman force is also now at Balabagh.
Mahommed Akbar Khan has had a private conference with Major
Pottinger; of which no account has transpired. We had two shocks of
earthquake at night.
27th.—A report that Sale has made another sally, and has taken a
number of prisoners. I heard from him to-day: he has sent me my
chest of drawers, with clothes, &c .: they were all permitted to come
to me unexamined. I had also an opportunity of writing to him by
Abdool Guffoor Khan, who brought them to me. I was rejoiced to
see any one I had known before; and especially one who was well
inclined towards the English, though nominally on the side of Akbar.
4th.—The irregular cavalry have had their horses and everything
taken away from them; and have been turned adrift. I wrote to Sale,
but my note did not go.
5th.—My note to Sale was sent to-day. I got another from him
dated the 29th, and replied to it.
9th.—We hear that all our horses are to be taken away; as also
our servants. Rain to-day, as if the clouds wept for our misfortunes.
10th.—I received boxes from Sale, with many useful things; and
also books, which are a great treat to us. I wrote to him, but fear my
letter will not reach him, as all notes that came for us were kept
back by the Sirdar; who is very angry, having detected a private
cossid between Capt. Macgregor and Major Pottinger: if we behave
ill again, the Sirdar says, woe will betide us. Abdool Guffoor again
came to see us; and I had again the comfort to hear that Sale was
well. We had rain to-day. Major Griffith arrived, with Mr. Blewitt.
Major Griffith tells me, that on the morning of the 13th, at
daylight, the miserable remains of the force, reduced to about 100
Europeans of all ranks, including 20 officers, worn out with fatigue
and hunger, and encumbered with very many wounded, some on
horseback and some on foot, were, when within four miles of the
bridge of Gundamuk, surrounded by a considerable number of the
enemy both horse and foot. They had only thirty-five muskets and
but little ammunition remaining; finding it impossible to proceed
further, a position was taken up on a hill to the left of the road; and
a parley opened with the enemy by means of waving a white cloth.
This produced a cessation of the firing; and brought four or five men
up to ascertain the cause. It was unanimously agreed that he (Major
Griffith), as senior officer of the party, should go to the chief, and
endeavour to make some terms for the peaceful march of the party
to Jellalabad. He accordingly went, accompanied by Mr. Blewitt as
interpreter, escorted by one or two of the enemy. On reaching the
chief, they were hurried off without his giving them the opportunity
of making any proposal. The last sight Major Griffith had of the party
he had left, they appeared to be engaged in hostilities with the
Affghans, whose numbers had gradually increased. He afterwards
understood that the waving of a loonghee is considered by them as
an act of unconditional surrender; and as our party would not give
up their arms, the Affghans resorted to force; but were driven off
the hill for the time. The few natives who had accompanied us so far
did not go up the hill; but kept the road, and were seen to be
plundered by the enemy. This he was afterwards told by Capt.
Souter; who was brought to the village of Tootoo some hours after
Major Griffith was taken there. This village was between two and
three miles to the right of the scene of action. The same evening
Major Griffith and Mr. Blewitt were taken to the Khan's fort, four or
five miles further on the hills; where they found three or four
European soldiers, who had escaped from the slaughter, wounded
and taken prisoners. Some days after five more Europeans were
brought in, who had proceeded in advance of our party. Major
Griffith opened a communication with Jellalabad; and was in great
hopes of effecting the release of the prisoners on ransom: but,
owing to the jealousy and suspicion of the Khan Ghobam Jan
Uzbezee, in whose power they were, nothing could be arranged. At
last, after twenty days' confinement, he allowed one of their party,
Serg.-Major Lisson, 37th N. I., to proceed to Jellalabad, and
endeavour to explain matters. The party in all consisted of ten: two
of these died, and Capt. Souter was left wounded at Tootoo.
The man who accompanied the Sergeant-Major returned the third
day, and told them all was right. He was understood to have
received 500 rupees as the ransom of the Sergeant-Major, who
remained at Jellalabad. The party had strong hopes of liberation: but
unfortunately the Sirdar, Mahommed Akbar Khan, heard of their
being prisoners and sent to demand them. After some hesitation it
was agreed to; and they were marched off to Charbagh to the
Sirdar, and from thence to Buddeeabad.
Major Griffiths was severely wounded in the right arm on the 8th
of January, just at the entrance of the Khoord Cabul pass; and, from
want of dressing, the wound had become very painful the day he
was taken prisoner.
11th.—Rain. We hear that the force under Col. Wylde have fallen
back on Peshawer; that Gen. Avitabile, the Sikh General with them,
has been obliged to retreat to Attock.
I had again an opportunity, and wrote to Sale.
To-day all arms have been taken from the officers, on a promise
that they shall be restored when we go away. I took poor Sturt's
sword myself and begged that the Sirdar would keep it himself; that
we might be sure of its restoration, as being invaluable to his widow.
Dost Mahommed Khan, Abdool Guffoor Khan, &c ., desired me to
keep it myself; acting in the handsomest manner, and evincing much
feeling on the occasion.
12th.—The snow at Tézeen is reported to be knee-deep. A very
dismal day, with gentle rain at night. The Europeans, who have
arrived, are all full of tales regarding each individual's escape. Six of
them, amongst whom was Serg.-Major Lisson, of the 37th N. I., at
daylight on the morning after the final struggle at Gundamuk, found
themselves about a mile and half on the Jellalabad side of
Gundamuk; and perceiving some Ghilzyes coming over the edge of a
hill, they betook themselves to a cave in the neighbourhood, where
they contrived to conceal themselves until about 11 A.M.; when their
retreat was betrayed by the neighing of a horse belonging to one of
the men, which caused them to be discovered by a party of the
enemy who were passing near the mouth of the cave. These men
came up, and told them to come outside; which they refused to do:
the Ghilzyes then offered them bread, provided they would pay for
it; and they thus procured three nans for forty-six rupees! The
enemy then again ordered them to come out of the cave; and they
replied, "In the evening, when it gets dusk, we will come outside."
They were watched till then; and at that time gave themselves up.
They were immediately rifled of all the money, &c . they possessed;
and then taken to a fort in the neighbourhood, and afterwards
transferred to another, where they found Major Griffiths; and from
whence Lisson was despatched to Jellalabad, to treat for terms of
ransom, as before mentioned.
13th.—A fine day. Not content with the arms given up, they
pretend our servants have others, and a general search took place
to-day; when all the poor wretches were fleeced of the few rupees
they had succeeded in securing on their persons.
14th.—This is the day that Mahommed Akbar Khan is to go over
the river towards Jellalabad to attack it. The 13th sent a quantity of
clothes for distribution amongst the gentlemen. I received a large
packet of letters, both from my family in the provinces, and also
from England, but no note from Sale; so the Sirdar is still angry
about the private correspondence. It was a very foolish attempt, for
there was no news of consequence to send; and rousing the Sirdar's
suspicion is not the way to make him kind to us.
15th.—Firing of heavy guns distinctly heard to-day; supposed to
be a salute at Jellalabad. Shah Shoojah is said to be still in the Bala
Hissar; and Zeman Shah Khan with Amenoollah Khan in the city.
They are said to be raising a force to be sent by the former against
Jellalabad; which force is to be commanded by his son Futteh Jung.
To-day we hear that our horses are not to be taken away from us;
and every thing is to be done to make us comfortable. There is an
old adage, that "Fair words butter no parsnips."
17th.—The ground was covered with snow at daybreak; which
continued to fall all day, and also at night. At breakfast-time we
distinctly heard the report from three guns; and about half an hour
afterwards three or four heavy discharges of musketry.
18th.—Dost Mahommed Khan came with his son; the family have
all arrived at a neighbouring fort in this valley. There is a report that
Sale has chupaoed Mahommed Akbar Khan's camp at Charbagh, and
cut up fifty of his men.
19th.—I heard from Sale. A friend writes me that there will be no
relief before April. At noon I was on the top of the house; when an
awful earthquake took place. I had gone up stairs to see after my
clothes; for, servants being scarce, we get a sweeper, who also acts
as saces, to wash for us; and I hang them up to dry on the flat roof:
we dispense with starch and ironing; and in our present situation we
must learn to do every thing that is useful. But to return to the
earthquake. For some time I balanced myself as well as I could; till I
felt the roof was giving way. I fortunately succeeded in removing
from my position before the roof of our room fell in with a dreadful
crash. The roof of the stairs fell in as I descended them; but did me
no injury. All my anxiety was for Mrs. Sturt; but I could only see a
heap of rubbish. I was nearly bewildered, when I heard the joyful
sound, "Lady Sale, come here, all are safe;" and I found the whole
party uninjured in the courtyard. When the earthquake first
commenced in the hills in the upper part of the valley, its progress
was clearly defined, coming down the valley, and throwing up dust,
like the action of exploding a mine.—I hope a soldier's wife may use
a soldier's simile, for I know of nothing else to liken it to. Our walls,
and gateways, and corner towers, are all much shaken, or actually
thrown down. We had at least twenty-five shocks before dark; and
about fifteen more during the night, which we spent in the
courtyard. The end wall of the room Lady Macnaghten and party
were in has sunk about two feet, and all the beams have started.
20th.—I wrote to Sale, to tell him we were all safe. At 3 in the
morning we had a pretty smart shock; and constant ones, some
severe, and many very slight, on an average every half hour all day,
and five or six slight ones at night. The gentlemen gave up their
largest room to my party, who were utterly roofless. Nearly all the
others slept outside: but we had only one crack in the roof of our
room, caused by part of the wall falling on it. The cold outside was
intense; and the dew completely saturated the bed clothes last
night: added to which, should the buildings come down, we were
safer above, for the yard was so crammed that, in case of accident,
half the people below must be crushed.
21st.—At 1 in the morning a sharp shock made us run to the door.
We had numerous slight, and three or four pretty good shocks: they
became more frequent in the evening. Part of our party made
awnings in the courtyard to sleep under; but Mrs. Sturt and myself
still preferred the house as safest.
Dost Mahommed Khan brought workmen to clear away the débris.
He tells us our fort is the best of forty that have suffered in this
valley; and that many are entirely thrown down. In one, a tower fell,
and crushed five women and a man: others have not a wall
remaining.
We have various reports regarding Jellalabad;—that it has been
taken, that the walls and all the defences are thrown down, &c .
Dost Mahommed says that a man was sent as a spy to Jellalabad:
that Macgregor sent for him; and, with Sale, took the man round to
show him the state of the place: that two bastions had sunk a little;
but that they were not only able to withstand Mahommed Akbar,
but, if he came against them, they would meet him in the plain. It is
said that Mahommed Akbar intends sending Gen. Elphinstone away
if he can get a palkee. Lady Macnaghten has requested she may go
with him; being, she says, differently circumstanced from the rest,
who have most of them their husbands with them. Not even an
animal's life was lost in our earthquake (I mean at our fort). Lady
M.'s cat was buried in the ruins, and dug out again.
22d.—My wounds are quite healed. We had earthquakes day and
night; less severe, but equally frequent. A prop was put up in our
room to support the broken roof. We experienced a curious shock in
the evening like a heavy ball rolled over our heads. Some large
pieces of hills have fallen, and immense masses of stone. I miss
some large upright stones on the hills that divide us from Kaffiristan,
and that looked in the distance like large obelisks.
23d.—This has been a very close and gloomy day; earthquakes
frequent, and some very sharp ones. We hear that, at Charbagh,
120 Affghans, and 20 Hindostanees were buried in the ruins.
Capt. Bygrave arrived,with one of his feet severely frostbitten: we
were all rejoiced to see him, having long supposed he had shared
the fate of the many. On the 12th of January, perceiving that our
army was utterly annihilated, he left the road at midnight, turned to
the left, and took to the mountains; where he was out seven days
and six nights. During a part of this time he was accompanied by Mr.
Baness, the merchant from Delhi, who had with him a small bag
containing coffee: on this they subsisted, taking each about six
grains a day. When this was spent Baness proceeded on; and we
afterwards heard that he got to Jellalabad, but so worn out with
fatigue that he only arrived to die. Capt. Bygrave suffered greatly
from having his feet frostbitten: he however contrived at daylight in
the morning of the 19th to reach Nizam Khan's village, called Kutch
Soorkhab, about four miles north of Gundamuk, and twenty-eight
from Jellalabad. Here he remained (plundered of course of what little
money he had about him) until the 14th of February; when he was
sent for to the Indian camp, then about six miles from Jellalabad. He
had been demanded some days previously; but Nizam Khan refused
to give him up until the arrival of the second messenger,
accompanied by two mounted followers, when he was obliged to
comply. Bygrave reached the Sirdar's camp in the afternoon of the
15th, and remained there with him till the 21st, on which day he
started for Buddeeabad; and has, as before remarked, this day
joined the other prisoners.
24th.—Very few shocks, and those gentle ones: but all last night,
and great part of to-day, particularly late in the evening, there was a
tremulous motion as of a ship that has been heavily struck by a sea,
generally feeling as if on the larboard quarter, and accompanied by a
sound of water breaking against a vessel. At other times we have
just the undulatory motion of a snake in the water: but the most
uncommon sensation we have experienced has been that of a heavy
ball rolling over our heads, as if on the roof of our individual room,
accompanied by the sound of distant thunder.
Abdool Ghyas Khan came to Buddeeabad. The report is, that
Sultan Jan was sent the day before yesterday with 1000 men to
make a false attack on Jellalabad; in which, on retreating, he lost
three men. Yesterday he was sent to repeat the experiment, an
ambuscade being planted by Mahommed Akbar's order; and it is said
that our troops were led on to the spot in pursuit of the fugitives;
and that the enemy lying in ambush attacked them, and cut up a
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like