371 Lotus blogs updated hourly. Who will post next?
Home
|
Downloads
|
Events
|
Jobs
|
Twitter
|
Bookmarks
|
Pods
|
Forum
|
Blogs
|
Search
|
myPL
|
About
May 24, 2012, 01:14:14 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Calendar
Login
Register
Planet Lotus Forum
>
Planet Lotus
>
General Information
>
FAQ: Planet Lotus upgrade / move.
Pages:
1
[
2
]
« previous
next »
Print
Author
Topic: FAQ: Planet Lotus upgrade / move. (Read 4078 times)
0 Members and 3 Guests are viewing this topic.
DarkRedSpiral
Newbie
Offline
Posts: 2
Re: FAQ: Planet Lotus upgrade / move.
«
Reply #15 on:
March 23, 2008, 11:29:31 AM »
Yancy no problem :-)
The reason you are getting the "Using temporary; Using filesort" from EXPLAIN
I believe is a combination of your GROUP BY and your our ORDER BY.
You do not (and cant) have an existing index on the calculated "HitCount" field so that
index has to be built. So this will be always forced into temporary by the File sort optimization engine
The benefit of the Sub Query is at the ORDER BY now only has to do 6 Items and not the entire
joined file.
You could try using a FORCE INDEX in the sub-query to ensure that the RSSID key is used by
the GROUP BY I don't think this will remove the "Using temporary; Using filesort" from EXPLAIN
but you may get a performance boost during the Group By data ordering as the SQL engine
may be forced to create a temporary index based on the the ORDER BY.
I would also try using a CAST on the COUNT(*) to force it to be a unsigned integer
as MySql returns the values as a UDT.. (i believe V4 of MYSQL returned a SIGNED)
a UDT can cause performance issues with sorting.
SELECT * FROM (
SELECT CAST(count(*) as UNSIGNED) as HitCount, hitsTABLE.rssid
FROM `hitsTABLE` FORCE INDEX (hitsTable.rssid)
WHERE (hitsTABLE.created > (DATE_SUB( CURDATE( ) , INTERVAL 5 DAY ))
GROUP BY hitsTABLE.rssid
ORDER BY 1 DESC
Limit 6
) AS TZero, 'rssTable' WHERE TZero.rssid = rssTable.id
Steve
Logged
Yancy Lent
Administrator
Full Member
Offline
Posts: 147
Re: FAQ: Planet Lotus upgrade / move.
«
Reply #16 on:
March 26, 2008, 04:00:25 PM »
Thanks again Steve!
It didn't like the FORCE INDEX (hitsTable.rssid) but it did everything else. Another huge enhancement was indexing the hitsTABLE.created column; expensive but huge performance increase on the select.
Logged
clinfoot
Newbie
Offline
Posts: 16
Re: FAQ: Planet Lotus upgrade / move.
«
Reply #17 on:
April 01, 2008, 06:56:58 AM »
Just a quick question - what happened to the preview goggles?
Logged
Pages:
1
[
2
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Lotus Community
-----------------------------
=> The Soap Box
=> Help!
-----------------------------
Planet Lotus
-----------------------------
=> General Information
=> Suggestion Box
=> Change Log
Loading...