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

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.

✶ Friday, 24 May 2013

˳ · ˖

Prior entry:
Next entry: