On 10/15/2014 6:05 PM, Michael Falconer wrote:
<prefix>addresses
<prefix>connections
<prefix>events
<prefix>family
<prefix>person
<prefix>repositories
<prefix>sources
<prefix>texts

Personally, I'd have one set of tables, each with an extra column containing <prefix>. Why do you need a separate set of tables, only to UNION them on every request? Instead of sharding by table, shard by row, using "prefix" column as a discriminator.

(SELECT humo1_person.*, event_kind, event_event, address_place, address_zip
UNION
     (SELECT humo2_person.*, event_kind, event_event, address_place,

Unless you do expect duplicates and need to eliminate them, use UNION ALL - it's much cheaper (this is assuming you insist on keeping multiple tables).
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to