Show Posts

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.

Messages - Dragooon
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]
                        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
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]
                        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>)
It comes insanely fast. Can anyone explain why?
439
Off-topic / Re: Old layout vs new layout?
« on June 4th, 2012, 09:35 PM »
Quote from Nao on June 4th, 2012, 09:32 PM
Looking good!

Footer needs extra top padding!
Thanks, and done!
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.
441
Off-topic / Re: Help with apache2
« on June 4th, 2012, 05:38 PM »
Quote from MultiformeIngegno on June 4th, 2012, 05:00 PM
Quote from Dragooon on June 4th, 2012, 04:35 PM
Quick fix would be to move the Alias to VHost declaration.
You mean adding the line 'Alias /phpmyadmin /usr/share/phpmyadmin' to the 'default' site and removing that line from phpmyadmin's apache.conf?
Yeah.
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 »
Quote from MultiformeIngegno on June 3rd, 2012, 10:47 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}
If you installed via apt-get then it'll let you know if they're required when trying to remove them.
444
Off-topic / What the...
« on June 3rd, 2012, 07:40 PM »
Code: (Search2.php, line 584 and 638) [Select]
$word = $word;

What am I missing?
445
Off-topic / Re: VPS
« on June 3rd, 2012, 12:41 PM »
I've been setting up my server (with the help of their community support) and it's been actually working. This is my expression:

446
Off-topic / Re: Help with apache2
« on June 2nd, 2012, 11:55 PM »
Quote from Nao on June 2nd, 2012, 11:38 PM
I had, for my own sanity, forgotten how fucked up server management can be...
I find those more insane who can navigate through all this without looking at documentation once.
447
Off-topic / Re: Help with apache2
« on June 2nd, 2012, 05:50 PM »
Quote from MultiformeIngegno on June 2nd, 2012, 05:42 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? :)
If you only need send and not receive, you can do a basic installation of Exim and be done in 5 minutes.
448
Off-topic / Re: Help with apache2
« on June 1st, 2012, 02:20 PM »
Quote from Arantor on June 1st, 2012, 02:18 PM
Sadly if only people were happy with that, people love having one-click updates to things...
Until one day a creep comes in and bombs their forum into oblivion...:P
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 »
Quote from Arantor on June 1st, 2012, 01:26 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.
What is this I don't even...