Frage

I have table with huge data (approximately 330 MB). When app search from the data it produced results very late. I am selecting just one column but it is also very slow. I have noticed that if I make a new table with that specific column then search results are fast. Tables structure is below.

AllData (table with huge data)

id    |  UName    |  details
1     |  ارشد    |  long text
2     |  احمد    |  long text

SearchTable

id   |  LatinNames
1    |  Arshad
2    |  Ahmad

I want to let the user search by LatinNames from SearchTable and select UName From AllData. Both tables have same ids so if we can search from SearchTable and then Select specific ids from AllData this will do the job.

War es hilfreich?

Lösung

If you want to get a name from AllDate but you have a LatinNames (that I think is want you are asking) you need a subselect.

select UName from AllData
where id= (select id from SearchTable where LatinNames ="Ahmad")
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top