-- Index for the 'id' column
CREATE INDEX idx_id ON venues (id);
-- Index for the 'name' column
CREATE INDEX idx_name ON venues (name);
-- Index for the 'type' column
CREATE INDEX idx_type ON venues (type);
-- Index for the 'status' column
CREATE INDEX idx_status ON venues (status);
-- Composite index for efficient sorting and searching by 'name'
CREATE INDEX idx_name_type_status ON venues (name, type, status);
-- Create an index for the `created_at` column
CREATE INDEX idx_created_at ON scans (created_at);
-- Create an index for the `venue_id` column
CREATE INDEX idx_venue_id ON scans (venue_id);
-- add_user_indexes.sql
-- Create an index on the `email` column
CREATE INDEX idx_email ON users (email);
-- Create an index on the `type` column
CREATE INDEX idx_type ON users (type);
-- Create an index on the `restaurant_id` column
CREATE INDEX idx_restaurant_id ON users (restaurant_id);
-- Create an index on the `created_at` column
CREATE INDEX idx_created_at ON users (created_at);-- Index on `restaurant_id`
CREATE INDEX idx_restaurant_id ON tables_info (restaurant_id);
-- Index on `table_number`
CREATE INDEX idx_table_number ON tables_info (table_number);
-- Index on `table_id`
CREATE INDEX idx_table_id ON tables_info (table_id);
-- Composite index on `restaurant_id` and `table_number`
CREATE INDEX idx_restaurant_table ON tables_info (restaurant_id, table_number);
-- Index on `request_id`
CREATE INDEX idx_request_id ON requests (request_id);
-- Index on `created_on`
CREATE INDEX idx_created_on ON requests (created_on);
-- Index on `status`
CREATE INDEX idx_status ON requests (status);
-- Index on `venue_id`
CREATE INDEX idx_venue_id ON requests (venue_id);
-- Composite index on `venue_id`, `status`, `created_on`
CREATE INDEX idx_venue_status_created_on ON requests (venue_id, status, created_on);
-- Index on `order_id`
CREATE INDEX idx_order_id ON orders (order_id);
-- Index on `created_on`
CREATE INDEX idx_created_on ON orders (created_on);
-- Index on `status`
CREATE INDEX idx_status ON orders (status);
-- Index on `venue_id`
CREATE INDEX idx_venue_id ON orders (venue_id);
-- Index on `category`
CREATE INDEX idx_category ON items (category);
-- Composite index on `venue_id`, `status`, `created_on`
CREATE INDEX idx_venue_status_created_on ON orders (venue_id, status, created_on);
-- Index on `order_id`
CREATE INDEX idx_order_id ON order_transactions (order_id);
-- Index on `created_at`
CREATE INDEX idx_created_at ON logs (created_at);
-- Index on `order_id`
CREATE INDEX idx_order_id ON items (order_id);
-- Index on `venue_id`
CREATE INDEX idx_venue_id ON items (venue_id);
-- Index on `created_at`
CREATE INDEX idx_created_at ON items (created_at);
-- Index on `venue_id`
CREATE INDEX idx_venue_id ON feedbacks (venue_id);
-- Index on `type`
CREATE INDEX idx_type ON feedbacks (type);
-- Index on `created_on`
CREATE INDEX idx_created_on ON feedbacks (created_on);
-- Index on `feedback_id`
CREATE INDEX idx_feedback_id ON fb_stars (feedback_id);
-- Index on `feedback_id`
CREATE INDEX idx_feedback_id ON fb_smileys (feedback_id);
-- Index on `fb_smiley_id`
CREATE INDEX idx_fb_smiley_id ON fb_actions (fb_smiley_id);
-- Index on `device_id`
CREATE INDEX idx_device_id ON devices (device_id);
-- Index on `last_seen`
CREATE INDEX idx_last_seen ON devices (last_seen);
-- Create an index for the `created_at` column
CREATE INDEX idx_created_at ON button_clicks (created_at);
-- Create an index for the `venue_id` column
CREATE INDEX idx_venue_id ON button_clicks (venue_id);
-- Create an index for the `button_name` column
CREATE INDEX idx_button_name ON button_clicks (button_name);
-- Create an index for the `created_at` column
CREATE INDEX idx_created_at ON banner_clicks (created_at);
-- Create an index for the `venue_id` column
CREATE INDEX idx_venue_id ON banner_clicks (venue_id);
-- Index on `fb_smiley_id`
CREATE INDEX idx_item_id ON addons (item_id);
-- Index on `resto_id`
CREATE INDEX idx_resto_id ON general_stats (resto_id);
-- Composite index on `date` and `resto_id`
CREATE INDEX idx_date_resto_id ON general_stats (date, resto_id);