-1

I have a big table in my database with thousands of rows and I need to have a quick access with some queries from my android application, let's say t < 0.05 s per query.

Is a good idea to split the big table in many smaller tables and make a switch from the app to decide to which one look at (suppose that the switch is simple in logic and quick to do)?

bluePhlavio
  • 537
  • 5
  • 18
  • Have you heard about indexes? ... also question is too broad, too general ... It always depends on data ... also what do you mean by "big" ... width(columns) or heigh(rows)? – Selvin Jul 09 '15 at 11:16
  • Show your database schema and the queries. – CL. Jul 09 '15 at 16:32

1 Answers1

0

you can use FTS

http://developer.android.com/training/search/search.html How to use FTS3 in SQLite

Community
  • 1
  • 1
drulabs
  • 3,071
  • 28
  • 35
  • @ KKD Is this method more efficient? I make query on primary key values that I think are very efficient. Something like SELECT * FROM positions ORDER BY ABS(t-t0) LIMIT 1; where t0 is time at which I want to read some objects positions and t is the primary key. Can your method help me? – bluePhlavio Jul 09 '15 at 11:39
  • what I am suggesting is not a method, it is called full text search or FTS it is a virtual table in SQLite DB. try using that table, it is faster. ad far as your query is concerned i don't think it will help. Primary key column has index but it is not useful when you use it like you mentioned. – drulabs Jul 09 '15 at 11:45