i have a table with 1505260 rows,
when i am executing this Query
select user_id from tbl_Payment_master
Run time should be 00:00:25,how to reduce it ,there is any other way to optimize this.
this is my table structure
CREATE TABLE [dbo].[tbl_payment_master](
[payment_Id] [bigint] IDENTITY(1,1) NOT NULL,
[advisor_id] [bigint] NULL,
[user_id] [bigint] NULL,
[premium_amount] [float] NULL,
[carry_Amount] [float] NULL,
[promotion_id] [bigint] NULL,
[No_Of_Due] [bigint] NULL,
[paid_date] [datetime] NULL,
[user_code] [nvarchar](max) NULL,
[employeeId] [bigint] NULL,
[year] [nvarchar](max) NULL,
[bvamt] [float] NULL,
[referral_id] [bigint] NULL,
[mode] [nvarchar](max) NULL,
[carrybv] [float] NULL,
[latefee] [float] NULL,
[dummypay] [nvarchar](max) NULL,
[delete_status] [bigint] NULL,
[paid_on] [datetime] NULL,
[deleted_by] [bigint] NULL,
[to ...
Go to the complete details ...