Hi couchers, so I have a java web interface that connects to couch, in this users can enter some optional parameters to query a view. I am trying to determine the most efficient way to query the view using keys (as opposed to filters), this is becuse the database is quite large and growing every day (its upt to about half a million rows). if I use a filter on the view it takes too long and the request times out :(
I have created a view with the required keys and optional parameters as keys. and it looks something like this: [Type, typeUUID, subType, subtypeName, accessingSystem, accessingUsername, dateCreated] system, username and date are the optional arguments (with date, users can enter fromDate and/or ToDate) ...I really dont think this type of query is possible when having everything in the key....my one idea was to make a view for each type of query in which i would have 7 different views and request that view depending on the request...for example if the user enters a accessingSystem i could call the view that as a key of [Type, typeUUID, subType, subtypeName, accessingSystem] or if the user enters accessingSystem and toDate have a key with [Type, typeUUID, subType, subtypeName, accessingSystem, date] and so on... any ideas? would it be at all possible to have all of this functionality with my one view contains all of the keys and use some sort of crazy startkey, endkey type lookup? S
