Page 1 of 1

storing config as "IDs" not names (eg 1 instead of

Posted: Sat Jul 16, 2005 3:33 pm
by krzys31337

Code: Select all

mysql> \s
mysql  Ver 14.7 Distrib 4.1.12, for pld-linux-gnu (i686) using readline 4.3

Uptime:                 12 hours 54 min 10 sec
Threads: 25  Questions: 108941  Slow queries: 0  Opens: 14087  Flush tables: 1  Open tables: 2  Queries per second avg: 2.345
Got silly question: why database storage is somehow not optimized.

look at:

Code: Select all

 select Name,Cause from Events limit 10;
+-----------+------------+
| Name      | Cause      |
+-----------+------------+
| Event-164 | Continuous |
| Event-163 | Continuous |
[...]
| Event-155 | Continuous |
+-----------+------------+
10 rows in set (0.00 sec)
Shouldn't that be just event numer (164 to 155 in above example) and some ID like "2" (2--Continous).

I've got some DB issues and would like cut addtitional overhead on MySQL.

Same with "MoCord" or "Record". One byte should be enough. Or even a few bits (Record yes/no, motiondetect yes/no). When db access will be "superb" and giving as less overhead as possible whole system would benefit.

In Events:

Code: Select all

+--------+---------+---------+--------+---------------------+------------+-------+
| Id     | EventId | FrameId | Type   | TimeStamp           | Delta      | Score |
+--------+---------+---------+--------+---------------------+------------+-------+
| 129256 |     657 |       9 | Normal | 2005-07-14 15:50:54 |      -0.71 |     0 |
| 129255 |     657 |       8 | Normal | 2005-07-14 15:51:03 |       8.08 |     0 |

Changig type to byte will give a lot, even coding as first char 'N-ormal,B-ulk,A-laram...' seems to be ok.

BTW: anyone testet php-accelerators like php-mmturck-cache?

Posted: Mon Jul 18, 2005 10:08 pm
by zoneminder
I don't think DB access is affected by having a few extra fields in the Event table. That is only inserted once per event. Also there is an id field that is a number, the Name is so users can change the event to 'Burglar smashing window etc'. Any field that is used regularly is indexed, and enum fields like Type are stored as integers anyway.

What database issues are you having?

Phil