-- create indexes

-- genres 
CREATE INDEX idx_genres_genre_name ON genres (genre_name);

-- movies
CREATE INDEX idx_movies_title ON movies (title);
CREATE INDEX idx_movies_genre_id ON movies (genre_id);

-- halls
CREATE INDEX idx_halls_hall_name ON halls (hall_name);

-- sessions
CREATE INDEX idx_sessions_movie_id ON sessions (movie_id);
CREATE INDEX idx_sessions_hall_id ON sessions (hall_id);
CREATE INDEX idx_sessions_begin_at ON sessions (begin_at);
CREATE INDEX idx_sessions_hall_id_begin_at ON sessions (hall_id, begin_at);

-- tickets
CREATE INDEX idx_tickets_session_id ON tickets (session_id);
CREATE INDEX idx_tickets_seat_number ON tickets (seat_number);

-- refunds
CREATE INDEX idx_refunds_ticket_id ON refunds (ticket_id);

-- roles
CREATE INDEX idx_roles_role_name ON roles (role_name);
CREATE INDEX idx_roles_access_level ON roles (access_level);

-- users
CREATE INDEX idx_users_username ON users (username);
CREATE INDEX idx_users_role_id ON users (role_id);
