I have three table in mysql user(1K) Campaign(6K) CamapaignDailyUSes(70K)
If I get data of all user by
Select User.column1,User.column2,Campaign.column1 ,Campaign.column2 ,
DailyUSes.* from User Join Campaign join CamapaignDailyUSes
it will give result in few secounds may be.
But in Couchbase N1ql it will take more then 1 minute
what should Do fot it ?? even create some proper index.
How can i structure my Couchbase data ??
can you post (or mail to [email protected]) the sample docs. Did you explore restructuring/embedding to avoid some JOINS. What is the exact N1QL query? Couches4.5 onwards has two kinds of joins for better performance (leveraging indexes better), and allowing more flexibility in JOINs.
See https://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/from.html#story-h2-3 for more info on lookup & index joins.
And, what are the sizes you specify.. size of document or number of documents?? If 70K is size of document, and you are fetching all of it, then what is the expected result size (based on selectivities). If you have too big results, then you may want to use parameters (in 4.5.1) such as pretty=false, to minimize the n/w overhead.
-Prasad