I know in ruby that when you want to find the size of your query say
[1,2,3,4,5,6] would provide 6 as the total size, length, or even count.
When I try to use size, length, or count on my application, I would get
a pretty darn slow performance (takes around 10 seconds to load each
count and I do it twice). Is there another faster way to get the total
size from the postgres query?
I am using this kind of format in database
e.g: table population [id, race id]
table race [id, persons id]
table persons[id, likes]
so if I use "population.race.persons.count" I would get the total size
of the persons in that particular race and population.