Different number of records in Database view and on a table

Dotychczas
Mega Guru

Hello Experts

I've created database view connecting cmdb_ci_service and kb_knowledge tables:
find_real_file.png


where clause is only set on kb: "kb_cmdb_ci=ser_sys_id && kb_meta = "SCP main document"

when I open database view which should show all the services i got 31700 records:
find_real_file.pngbut when I open service table there is only 31687 records:

find_real_file.pngwhy the number of records isn't the same?

1 ACCEPTED SOLUTION

John Dahl
Tera Guru
If you have 2 articles associated to one if the cmdb records, you will see the cmdb record twice…once for each article. This is why the counts don’t add up.

View solution in original post

3 REPLIES 3

Vamsi Sreenivas
Tera Guru

Hi,

Database view returns all the records in both tables that matches the where clause. In which table you are seeing more records? Can you verify your screenshots 2nd and 3rd screenshots are same.

Regards,

Vamsi S

I edited my question now screenshots are correct. I have more records in database view table. 

John Dahl
Tera Guru
If you have 2 articles associated to one if the cmdb records, you will see the cmdb record twice…once for each article. This is why the counts don’t add up.