Re: query optimization
| From: | Micah Gersten | Date: | Thu, 25 Sep 2008 21:18:22 +0000 |
| Subject: | Re: query optimization | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45460@lists.php.net to get a copy of this message | ||
What indices do you have?
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
YVES SUCAET wrote:
> How could I rewrite the following query so it runs faster:
>
> select distinct location from blockunit where blockid in (
> select bu.blockid from blockunit bu inner join interactionparts ip on
> (bu.blockid = ip.part)
> where ip.blockid in
>
> (110936,110937,111641,111642,113140,113141,114925,114926,121161,121162,124087,
> 124088,124562,124563,133358,133359,133409,133410,135304,135305,136096)
> union
> select bu.blockid from blockunit bu
> where bu.blockid in
>
> (110936,110937,111641,111642,113140,113141,114925,114926,121161,121162,124087,
> 124088,124562,124563,133358,133359,133409,133410,135304,135305,136096)
> )
>
> Thanks in advance,
>
> Yves
>
>
>
>