How do I handle a union of multiple tables in Xataface?
5 posts
• Page 1 of 1
How do I handle a union of multiple tables in Xataface?I have multiple tables, all with the same fields. mySQL/xataface just runs too slow if I put them into one big table. So how do I search across all of them at once, i.e. search a union of the tables? - or is this the wrong approach?
Last edited by Jusmee on Mon Jul 05, 2010 10:46 pm, edited 1 time in total.
Re: How do I handle a union of multiple tables if Xataface?You could create a view with the union and search that.
Re: How do I handle a union of multiple tables if Xataface?
OK, it's my lack of knowledge with xataface, but, will it list and search a view the same way as it does tables? Do you just put the view name in the ini file as if it was a table?
Re: How do I handle a union of multiple tables in Xataface?Yes. You just need to tell xataface which fields are part of the primary key. You do that in the fields.ini file with the Key=PRI directive.
e.g.
Re: How do I handle a union of multiple tables in Xataface?Yep that works, thanks. The only downside is that views with a UNION clause are non-updatable.
5 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 41 guests |