16 квітня 2010 р. 16:21 Yeb Havinga
<yebhavinga@gmail.com> написав:
Віталій Тимчишин wrote:
BTW: Changing slow query to inner joins do not make it fast
I'm interested to see the query andplan of the slow query with inner joins.
Here you are. The query:
select * from company this_ inner join company_tag this_1_ on this_.id=this_1_.company_id
inner join company_measures companymea2_ on this_.id=companymea2_.company_id
inner join company_descr ces3_ on this_.id=ces3_.company_id
where this_1_.tag_id = 7 and this_.id>50000000
order by this_.id asc
limit 1000
;
Total runtime: 14088.942 ms
(plan is attached)
Best regards, Vitalii Tymchyshyn