this is a query for the Unified Medical Language System (UMLS) to find a word related to a normalized word. this query result is 165MS, but if I run VIEW of the same query, it takes 70 seconds. I am new to mysql. Please help me.
Query:
SELECT a.nwd as Normalized_Word, b.str as String, c.def as Defination, d.sty as Semantic_type FROM mrxnw_eng a, mrconso b, mrdef c, mrsty d WHERE a.nwd = 'cold' AND b.sab = 'Msh' AND a.cui = b.cui AND a.cui = c.cui AND a.cui = d.cui AND a.lui = b.lui AND b.sui = a.sui group by a.cui
View definition:
create view nString_Sementic as SELECT a.nwd as Normalized_Word, b.str as String, c.def as Defination, d.sty as Semantic_type FROM mrxnw_eng a, mrconso b, mrdef c, mrsty d WHERE b.sab = 'Msh' AND a.cui = b.cui AND a.cui = c.cui AND a.cui = d.cui AND a.lui = b.lui AND b.sui = a.sui group by a.cui
Select from view:
select * nString_Sementic where nwd = 'phobia'
source share