Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • How fast is

    SELECT authname FROM invoices i WHERE i.affid = 654248 AND i.commpaid = 0;

    You're doing a full table scan on invoices alone, without the join, and that SHOULD be painful.

    So, index on affid.

    • Bingo! That reduces the query time down to .15 seconds :)

      I don't understand the EXPLAIN output as well as I should (duh!). How did you deduce the full table scan on invoice from this?

      +----+-------------+-------+--------+------------------+----------+---------+--- -------------+---------+-------------+
      | id | select_type | table | type   | possible_keys    | key      | key_len | ref            | rows    | Extra