This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
436
Off-topic / Re: MySQL query optimization
« on June 4th, 2012, 11:25 PM »
I see that makes more sense now, but I still don't get one thing. I'm using the same clauses and sorting in both cases, but why is it doing filesort in first case but not in second?
437
Off-topic / Re: MySQL query optimization
« on June 4th, 2012, 11:10 PM »
Not sure what to make of this
Code: [Select]
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: b
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 41438
Extra: Using where; Using temporary; Using filesort
*************************** 2. row ***************************
id: 1
select_type: SIMPLE
table: u
type: ALL
possible_keys: PRIMARY
key: NULL
key_len: NULL
ref: NULL
rows: 5
Extra: Using where; Using join buffer
*************************** 3. row ***************************
id: 1
select_type: SIMPLE
table: ua
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 4235
Extra:
*************************** 4. row ***************************
id: 1
select_type: SIMPLE
table: a
type: eq_ref
possible_keys: PRIMARY
key: PRIMARY
key_len: 4
ref: bhd.b.id_account
rows: 1
Extra:
4 rows in set (0.00 sec)438
Off-topic / MySQL query optimization
« on June 4th, 2012, 11:01 PM »
I'm fairly dense when it comes to MySQL optimization mostly because I never had to do it. But now it seems to be required as I got a DB that's bigger than anything I've managed (which hasn't been randomly populated with a bunch of rand() calls). So, basically I got a table called bills which has only one primary key and index as id_bill
I run this query
Code: [Select] And it causes the entire table to be copied into tmp, causing timeouts as the table contains roughly ~40k rows and takes a lot of time to process, whereas dividing it into 2 queries
Code: [Select] It comes insanely fast. Can anyone explain why?
I run this query
SELECT <columns>
FROM bhd_bills AS b
INNER JOIN bhd_accounts AS a ON (a.id_account = b.id_account)
INNER JOIN bhd_users AS u ON (u.id_user = b.id_raised)
LEFT JOIN bhd_accounts AS ua ON (ua.id_user = u.id_user)
WHERE cancelled = 0
AND 1=1
ORDER BY b.id_bill DESC
LIMIT 0, 20 SELECT b.id_bill
FROM {prefix}bills AS b
WHERE cancelled = 0
AND 1=1
ORDER BY b.id_bill DESC
LIMIT 0, 20;
SELECT <columns>
FROM bhd_bills AS b
INNER JOIN bhd_accounts AS a ON (a.id_account = b.id_account)
INNER JOIN bhd_users AS u ON (u.id_user = b.id_raised)
LEFT JOIN bhd_accounts AS ua ON (ua.id_user = u.id_user)
WHERE id_bill IN (<result from above>)439
Off-topic / Re: Old layout vs new layout?
« on June 4th, 2012, 09:35 PM »Looking good!
Footer needs extra top padding!
440
Off-topic / Re: Old layout vs new layout?
« on June 4th, 2012, 09:12 PM »
Giving this a bump, have a look at the new layout on the site (been working on this for the past week). It's still a big WIP but it's in a fairly okay situation (made 32 commits today :P).
http://bazaarshotdeals.com
Feedback is appreciated.
http://bazaarshotdeals.com
Feedback is appreciated.
441
Off-topic / Re: Help with apache2
« on June 4th, 2012, 05:38 PM »You mean adding the line 'Alias /phpmyadmin /usr/share/phpmyadmin' to the 'default' site and removing that line from phpmyadmin's apache.conf?Quote from Dragooon on June 4th, 2012, 04:35 PM Quick fix would be to move the Alias to VHost declaration.
442
Off-topic / Re: Help with apache2
« on June 4th, 2012, 04:35 PM »
Quick fix would be to move the Alias to VHost declaration.
443
Off-topic / Re: Help with apache2
« on June 3rd, 2012, 10:50 PM »As these packages used by exim4 or I can remove 'em?
m4{u} procmail{u} sendmail-base{u} sendmail-cf{u} sensible-mda{u}
444
Off-topic / What the...
« on June 3rd, 2012, 07:40 PM »$word = $word;What am I missing?
446
Off-topic / Re: Help with apache2
« on June 2nd, 2012, 11:55 PM »I had, for my own sanity, forgotten how fucked up server management can be...
447
Off-topic / Re: Help with apache2
« on June 2nd, 2012, 05:50 PM »Stupid stupid stupid question... :blush:
To make the PHP mail() function work do I need a SMTP server installed or something..? If yes can you suggest one? :)
448
Off-topic / Re: Help with apache2
« on June 1st, 2012, 02:20 PM »Sadly if only people were happy with that, people love having one-click updates to things...
449
Off-topic / Re: Help with apache2
« on June 1st, 2012, 02:17 PM »
Yeah it works fairly well, although it does lock Package manager and the likes out by default, but that should be the case anyway.
450
Off-topic / Re: MyBB Official site compromised
« on June 1st, 2012, 02:13 PM »There are many MyBB fans I've met who won't even sign up to an SMF forum because it's 'worse'. Until you reskin it and it doesn't look the same as SMF default themes, of course. Then they join because they don't realise it's SMF.