> Thanks you but what I want to do is to count without using count(distinct
> col) because it is much slower than count(*).
I think you'll find the schema I posted very fast, since it's running
everything, including distinct, on primary key columns.
Or you can try this:
select count(*) from People
where ID in
( select People_ID from "Movie People" where Capacity_ID =
(select ID from Capacity where Name = 'director')
);
But I expect you'll get the same performance.
You don't want to denormalize and have separate director and writer tables etc.
That will get ugly.
Tom
BareFeetWare
--
Comparison of SQLite GUI tools:
http://www.barefeetware.com/sqlite/compare/?ml
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users