When you say you only have read permissions, I assume you mean on the database server. Surely the application could generate and run a ticker or triggers to update the index when (some number of) changes are made on these tables (in some DBMS systems you could subscribe to notifications of updates on a specific database and/or table. Also, yes, if this is a frequent need in the application the database can specifically be told to create indices for the data, depending on the system in question, but this will obviously be distant from your field of influence.
It looks to me like you have a pretty fixed set of matching criteria so an index could return the subset very quickly. The Badger database is a good choice for creating the indices as you can easily encapsulate some part of the search index in the keys, which can optionally held in memory for super fast access, or at least in the case of Badger the key and value logs are separated so even on disk it's still faster if you can add something searchable to the keys with, while not overly reducing write speed. On Tuesday, 26 February 2019 07:08:00 UTC+1, RZ wrote: > > Thanks Tamas, > > Query itself is slow if i include all url strings. it takes about 10 mins. > But when i hit one at a time, i see better response overall. Yes so was > planning on running them in parallel. > > We only have read permissions and hence i am not allowed to add new index, > but good idea, will try reaching out to Admin and see if they can add this. > > i have not tried that way of similar to, will try that as well. > > > On Tuesday, 26 February 2019 00:36:26 UTC+5:30, Tamás Gulácsi wrote: >> >> How fast is the query? You can make it parallel, but if it is sliw, the >> you have to target that first. >> >> How big is the set of one user's all urls? How fast is to get this? Maybe >> adding some indexes may help >> >> >> How fast is the query with one pattern only? Maybe combining them into a >> "similar to '%(abc|def|ghi)%'" would be faster? >> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.