I have a database to store information about person(Exp: name, sex, birthday...). The information of one person is not stored in one table, it is stored in some table. I want to count the same column's value of two person (same name, same sex...). I did it but it take too much time, very slow when the number of person is so big( I compare column with column, increase count variable if two column is the same but i think my algorithm is not optimal). Could you teel me how to do this to speed up?
Thankyou so much!