1
나는 같은 쿼리를 수행하는 동안 MySQL 서버에서 빠른 응답을 검색하는 어려움을 조금 보내고있어 : 훨씬 더 빨리 제공 응답 다른 쿼리 방법이 있다면어떻게 중첩 된 mysql 쿼리 속도를 향상시킬 수 있습니까?
select distinct(products.id) as product_id,products.title as product_name, (select count(id) from stock where stock.available='0' and stock.product_id=products.id) as none,
(select count(id) from stock where stock.available='1' and stock.product_id=products.id) as available,
(select count(id) from stock where stock.available='2' and stock.product_id=products.id) as staged,
(select count(id) from stock where stock.available='3' and stock.product_id=products.id) as departed,
(select count(id) from stock where stock.available='4' and stock.product_id=products.id) as delivered
from products,stock where products.id=stock.product_id;
내가 궁금합니다. 고맙습니다 이런
오 나의 햄릿은 그 날에 미리 문입니다. 처음으로 참여하게 될거야,하지만 그래 .. 저기있는 사람이 트릭을 잘했다고! Thanx mate :-) – Jeebsion
실수가 있었는데, 업데이트 된 버전을보십시오. –
아 .. 예 .. 다시 한 번 감사드립니다. 햄릿 – Jeebsion