Just following up with the results of my testing here, it looks like this
is actually a non-issue as suggested, I made a test table with 500,000 rows
and profiled an insert query, and it looks like the time taken to update
the index is very small. I haven't done query profiling before, can someone
suggest to me if this is a conclusive way to measure the query
performance. This is from my mysql console:
mysql> SET profiling=1;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO index_update_test (user_id, topic_id) VALUES
(61368,536857);
Query OK, 1 row affected (0.04 sec)
mysql> SHOW PROFILES;
+----------+------------+-----------------------
------------------+
| Query_ID | Duration | Query
|
+----------+------------+-----------------------
------------------+
| 1 | 0.04045325 | INSERT INTO index_upda
ES (61368,536857) |
+----------+------------+-----------------------
------------------+
1 row in set (0.00 sec)
mysql> SHOW PROFILE FOR QUERY 1;
+------------------------------+----------+
| Status | Duration |
+------------------------------+----------+
| starting | 0.000135 |
| checking permissions | 0.000012 |
| Opening tables | 0.000034 |
| System lock | 0.000013 |
| init | 0.000017 |
| update | 0.000143 |
| Waiting for query cache lock | 0.000004 |
| update | 0.000013 |
| end | 0.000004 |
| query end | 0.039789 | <<<<------ Looks like this is
the index update.
| closing tables | 0.000017 |
| freeing items | 0.000266 |
| logging slow query | 0.000005 |
| cleaning up | 0.000003 |
+------------------------------+----------+
14 rows in set (0.00 sec)
On Fri, Aug 9, 2013 at 5:59 PM, Simon Holywell <[email protected]>wrote:
> In addition I would look at how PHPBB, PunBB, Vanilla and other OS forums
> get around this problem. Perhaps even Discourse might be worth looking at.
>
> --
> --
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "NZ PHP Users Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nzphpug/U8epbiswwgc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
---
You received this message because you are subscribed to the Google Groups "NZ
PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.