Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Garbage in database tables

 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
temoon



Joined: 28 Feb 2008
Posts: 4

PostPosted: Thu Feb 28, 2008 6:14 am    Post subject: Garbage in database tables Reply with quote

Hi, Developers.

Before, sorry for my english...

Ok. Let's go...
1st: We have two Data Inputs for source like
Code:
a:1 b:1 c:1

and
Code:
a:1 b:1 d:1 e:1 f:1

This shows, what we have in `data_input_fields` table anythink like this
Code:

+-----+---------------+-----------------+-----------+--------------+------------+----------+-----------+
| id  | data_input_id | name            | data_name | input_output | update_rra | sequence | type_code |
+-----+---------------+-----------------+-----------+--------------+------------+----------+-----------+
| 418 |            26 | F               | f         | out          | on         |        0 |           |
| 416 |            26 | E               | e         | out          | on         |        0 |           |
| 417 |            26 | D               | d         | out          | on         |        0 |           |
| 419 |            26 | B               | b         | out          | on         |        0 |           |
| 415 |            26 | A               | a         | out          | on         |        0 |           |
| 105 |            26 | Hostname (FQDN) | hostname  | in           |            |        2 | hostname  |
| 106 |            26 | Source Filename | filename  | in           |            |        1 |           |
| 109 |            68 | C               | c         | out          | on         |        0 |           |
| 110 |            68 | B               | b         | out          | on         |        0 |           |
| 111 |            68 | A               | a         | out          | on         |        0 |           |
+-----+---------------+-----------------+-----------+--------------+------------+----------+-----------+
10 rows in set (0.00 sec)

2nd: I am merge this two Data Inputs in one (delete 1st one of this and add some values in other), and have like this
Code:

+-----+---------------+-----------------+-----------+--------------+------------+----------+-----------+
| id  | data_input_id | name            | data_name | input_output | update_rra | sequence | type_code |
+-----+---------------+-----------------+-----------+--------------+------------+----------+-----------+
| 418 |            26 | F               | f         | out          | on         |        0 |           |
| 416 |            26 | E               | e         | out          | on         |        0 |           |
| 417 |            26 | D               | d         | out          | on         |        0 |           |
| 509 |            26 | C               | c         | out          | on         |        0 |           |
| 419 |            26 | B               | b         | out          | on         |        0 |           |
| 415 |            26 | A               | a         | out          | on         |        0 |           |
| 105 |            26 | Hostname (FQDN) | hostname  | in           |            |        2 | hostname  |
| 106 |            26 | Source Filename | filename  | in           |            |        1 |           |
+-----+---------------+-----------------+-----------+--------------+------------+----------+-----------+
8 rows in set (0.00 sec)

3rd: But "link" to data input field, what was deleted, hold stay in `data_template_rrd` table. All unused (broken) lines I have selected like this:
Code:
SELECT * FROM `data_template_rrd` a WHERE a.`data_input_field_id` NOT IN (SELECT b.`id` FROM `data_input_fields` b);


I have like 1800 unused lines for half of year of work... O.o
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group