I am following an online database course and I got this question.
Assume I have tables USER, CHECKIN and PLACE.
USER(uid, uname, ucity), uid is the primary key.
PLACE (pid, pname, pxcoord, pycoord, pcity), pid is the primary key.
CHECKIN (uid, pid, cdate, ctime), (uid, cdate, ctime) is the primary key.
The query is
select c.uid, c.pid c.cdate
from user u join checkin c join place p
where ucity='NewYork' and pcity='Chicago'
Only allowed to create up to two index structures, what is the best choice and why?