# Is It max performance on one server or did I missed something ?

**URL:** <https://forums.percona.com/t/is-it-max-performance-on-one-server-or-did-i-missed-something/1418>\
**Category:** Other MySQL® Questions\
**Created:** [May 31, 2010, 11:13am UTC](https://forums.percona.com/t/is-it-max-performance-on-one-server-or-did-i-missed-something/1418 "2010-05-31T11:13:09Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![sterin71](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sterin71](https://forums.percona.com/u/sterin71)\
**Post date:** [June 11, 2010, 7:13am UTC](https://forums.percona.com/t/is-it-max-performance-on-one-server-or-did-i-missed-something/1418/21 "2010-06-11T07:13:50Z")

</div>

| [B]xaff wrote on Fri, 11 June 2010 11:50[/B] |
| 

I added index but,there still “f#%?! copying to temp table ^^” it seems because of “… \* (vtpDomain.Rank + vtpUri.Rank)”, without those EXPLAIN no more says Using Temporary.

 |

Yes you might still get copying to temp table, but what is actually the performance at this point after the last index and how many rows you got left in the result set?

I ask this question since the WHERE conditions and the JOIN should have reduced this result set to a manageable size, or do you still a lot of rows so that the intermediate table is large?  
You should calculate this size and set the tmp\_table\_size values about maybe 15-20% larger than the size of this temporary table instead of 1000M as you have now.

And on a side note you can rewrite your query like this, where you place the conditions for each table in the JOIN condition instead of the WHERE. It makes it easier to read and know which indexes that should exist on each table:

SELECT SQL\_NO\_CACHE HIGH\_PRIORITY SQL\_NO\_CACHE SQL\_CALC\_FOUND\_ROWS vtpUri.Id as UriId, (ws0.Score) \* (vtpDomain.Rank + vtpUri.Rank) as uriScore, vtpUri.Domain\_Id FROM vtpUri INNER JOIN vtpWordScore AS ws0 ON (ws0.Uri\_Id = vtpUri.Id) AND ws0.Word\_Id = 4598 – ← hereINNER JOIN vtpDomain ON (vtpDomain.Id = vtpUri.Domain\_Id) AND vtpDomain.vtpCategory\_Id != 2 – ← here AND vtpDomain.IsOff != 1 – ← hereORDER BY uriScore desc LIMIT 0,400

[Previous page](https://forums.percona.com/t/is-it-max-performance-on-one-server-or-did-i-missed-something/1418.md?page=1)
