BlameThePixel!

BTForum » BlameTheOffTopic Forums » BlameTheGeneralOffTopic » Any SQL geniuses in da house?

[S]CBWhiz
Looking For Status
Send PM
Posts: 1044
Threads: 130
Money: £1343.20 (D)
(+ Friend)
Not online within the last half an hour
How can I optimize this further, and why isnt mysql using timeindex:

Query:
\n
SELECT DISTINCT f_forums.id AS id FROM f_forums INNER JOIN f_threads ON f_threads.forum = f_forums.id LEFT OUTER JOIN f_read ON f_read.thread = f_threads.id AND f_read.name = '$loggedin' WHERE ( f_read.time < f_threads.time OR f_read.thread IS NULL ) AND f_threads.time > 0
\n

EXPLAIN output:

tabletypepossible_keys keykey_lenrefrows Extra
f_threadsALLforumindex,timeindexNULLNULLNULL641Using where; Using temporary
f_forumseq_refPRIMARY,id,id_2PRIMARY4f_threads.forum1Using where; Using index
f_readrefthreadindexthreadindex4f_threads.id11Using where; Distinct
25.08.03 16:20
Post #1
[Hide Sig (3)] [Profile] [Quote]
[G]meiapaul
Statusless
Send PM
Posts:
Threads:
Money: £0.00 (D)
(+ Friend)
Not online within the last half an hour
sorry, i dont have a clue
25.08.03 17:59
Post #2
[Hide Sig (0)] [Profile] [Quote]
[S]ReadMe
Absent
Send PM
Posts: 2820
Threads: 85
Money: £43.42 (D)
(+ Friend)
Not online within the last half an hour
try http://www.codingforums.com they generally know what they're talking about on any coding/ web design subject

________________
Cant be arsed to remake my sig.
26.08.03 18:30
Post #3
[Hide Sig (7)] [Profile] [Quote]

Post Reply

Jump To:


Your Comments:

Donate to BlameThePixel:
Donate to BTP Via PayPal


[22 Queries, Page Loaded in 0.274844 Seconds]

ShoutMeUp

Xmas Greetings from waka waka waka waka []Unvalidated EmailChristmasRiddle MERRY CHRISTMAS EVERYONE! []Spleet Except for Spleet. []TheAbdBoy Always bummin' a brother out. []Spleet Happy New Year everyone! But Spleet. []TheAbdBoy

Word Association

All

-10 Ago-

MiddleEastern []AlphaWolf camel [S]Bloopy toe []TheAbdBoy moose knuckle [S]Bloopy MeatLoaf []Spleet IdDoAnything4Lo ve []AlphaWolf rub n tug []TheAbdBoy tugboat []The Pope rope [S]Bloopy race []TheAbdBoy

-Latest-


Must be logged in to add new words

FictoLeague

You have to be logged in to vote...

Member Stats

Date: 15.05.24.
Members: 4731.
Latest: []Unvalidated Emailsdsakldsaldklasdsdsa
Active:
0 user(s)
1 guest(s)

On chat:
Lots of people

Files: 3330

Bloopy's Site
Get Firefox Get Opera Donate to BTP Via PayPal