Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Indexes on expressions
Partial indexes
Clustered indexes
Summary
13. Quiz Time

Instruction

Okay, here's the quiz question for you!

Exercise

A veterinarian has the following table:

CREATE TABLE pet (
  id integer PRIMARY KEY,
  owner_id integer,
  name varchar(128),
  type varchar(64)
);

Most pets are dogs, and they are usually searched for using:

WHERE LOWER(name) = ... 

Create a partial index named dog_name on the expression LOWER(name) for pets with the type 'dog'.