On 2014/07/28 15:53, Jonathan Moules wrote:
Fair question, but I'm doing log analysis. Each set of tables will be for a
given server that's being analysed. The application that uses the data is a
read-only web-app, so my database needs to be optimised for SELECT queries.
I don't anticipate there being many servers in an install so the number of
table sets should be small. However the number of rows can be fairly large;
I figure this method should offer a small speed up on the potentially
larger datasets even if it's not strictly best-practice.
That said, I don't suppose there's any option for the other variable
($date_string)?
Fair application, isn't it possible to create the view without the where exclusion of dates (making sure to add the date as a
column) and then simply select form the view (for which you can really use variable binds) like so:
Select * from myView WHERE time_date > ?1
Obviously in any programming language there is a hundred solutions to the above, with all different efficacies, but from a purely
SQL functionality point of view this is not really a supported feature. There is no point to having variables in SQLite because
there are no Stored Procedures you can call with variable parameters. There are only Binds which is a programmatic solution, and can
always be used in any query (as above).
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users