Index on a field

BittenApple
BronzeLounger
Posts: 1498
Joined: 01 Mar 2015, 02:03

Index on a field

Post by BittenApple »

Hello team,
I have a query in sql server, I only have read/ select right to database. I wonder if I can insert an index on one the fields that I am going to use in a query.
Or should I create a view and then insert an index on that field in a view?
Regards,
appbita

User avatar
HansV
Administrator
Posts: 78629
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Index on a field

Post by HansV »

If you have read-only permissions, I assume that you cannot create indexes or permanent views...
Best wishes,
Hans

BittenApple
BronzeLounger
Posts: 1498
Joined: 01 Mar 2015, 02:03

Re: Index on a field

Post by BittenApple »

Hello Hans,
Then what approach should I take to load data and insert the index on a field that I want?
Regards,
appbita

User avatar
HansV
Administrator
Posts: 78629
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Index on a field

Post by HansV »

You could open an ADO recordset on a table and set an index on the recordset. See Seek Method and Index Property Example (VB). The example uses an Access database, but it should work for a SQL Server database as well.
Best wishes,
Hans