Simon Griffee · Time, light, movement & distance.

Real World Example of the Performance Gains of a Database Index ➶

24 May 2013

From the excellent cs253 Web Development (formerly Web Application Engineering) Udacity course:

:::shell
$ psql hipmunk
$# select count(*) from hotels;
$# select name from hotels where id = 51492;
$# explain analyze select name from hotels where id = 51492;
$# create index hotel_id on hotels(id);
$# explain analyze select name from hotels where id = 51492;

Also check out Postgres Guide.

What

Send