F
F
foonfyrick2021-02-11 07:19:14
android studio
foonfyrick, 2021-02-11 07:19:14

Room, indices and @Index?

More than once I come across the fact that in some kind of training lesson (in this case, on startandroyd), they talk about something, but how to use it - read it on the Internet, I can’t find information for an hour, tell me how it works .
The documentation says @Column(index = boolean) - if you want this field to be indexed, set it to true. Field indexing speeds up query execution.
1. What kind of requests, by field?
2. How fast?
3.And if I request the entire column, and it has indexed fields, will their indexing affect the speed?

So I make a request for this field and do not see the difference whether it is indexed or not ...

indices = [Index("salary",unique = true,name = "MyIndex")
name - index name, how to get it? I want to query all index names, how can I do that? And if you do not specify it, what will be in place of the name?
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question