[TYPO3-Performance] mysql performance
Christoph Mayer
typo308 at php-design.de
Fri Jul 11 11:22:55 CEST 2008
Hi performance list,
I have a question to mysql performance with this example (this is just a
example to explain and not real):
My website has altogether 20 possible $_GET parameters and I want to log all
$_GET params of each click in a table. Every click has just a few an not all
$_GET params. So I think I have two possibilities for the table design:
1. table with 20 fields for all parameters
or
2. table with field for url_id and 2 extra fields for key and value
Example URLs:
http://www.example.org/index.php?param_1=test¶m_4=typo3¶m_5=ok
http://www.example.org/index.php?param_1=mysql¶m_3=radio
Table Design 1
Id | param_1 | param_2 | param_3 | param_4 | param_5 | param_6 ... param_20
---------------------------------------------------------------------------
1 | test | | | typo3 | ok |
2 | mysql | | radio | | |
...
Table Design 2
Id | url_id | key | value
--------------------------------
1 | 1 | param_1 | test
2 | 1 | param_4 | typo3
3 | 1 | param_5 | ok
4 | 2 | param_1 | mysql
5 | 2 | param_3 | radio
...
So which table design is better in order to get a performante table?
- table design 1 has only one entry to each click but a lot of empty fields
- table design 2 has several entries to each click but no empty fields
thank you for that help
- Christoph -
More information about the TYPO3-Performance
mailing list