Welcome to the iMore Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 1 of 1
  1. Thread AuthorThread Author   #1  
    Vaishali Kale's Avatar
    iPhone Nanite

    Posts
    1 Posts

    Default Ios :- Core data and predicate on large volume.

    In one of my current project requirement is to view product information in particular date range.

    Input
    No. Of products :- P1 P2 P3 P4 P5
    No of channels....:- C1 C2 C3 C4
    No of regions :- R1 R2 R3 R4
    Depending on any of the above combination user can select either "Daily" "Weekly" "Monthly" "Yearly" for daily for Perticular date there will be (5 produtcts *4 channel*4 regions)= 80 Combinations

    Daily :- so for 5 years it will be (80*365*5=1,46, 000) records
    Montly:- for 5 years :- 12 *5 = 60 so total 4800 records.
    quarterly for 5 years :- 4 *5 = 20 so total (20*80) =1600 records.
    That means we can calculate all daily, monthly, quarterly and yearly using daily data.

    As user can vary the selected combination of products, channels and regions and can also select the date range.

    Looking at the search criteria, we decided to load the data into core data and then use predicate to fetch the data.

    Calculation formula:-
    Day :- On perticular date
    Weekly :- On friday i.e. end of week
    Monthly :- 31/30 month end date
    Quarterly :- March end date , Jun end date etc.
    Yearly 31st dec date
    But my question is:
    1.Can we use Daily model to fetch also monthly, quarterly and yearly information. Memory optimization good vs response time less 2. Separate data model for Daily , Monthly and quarterly. (Yearly we can calculate from quarterly). [Response time good but duplicate data]

    Yes we can use date predicates .But our concern was is CoreData that efficient to query such large data considering we have number of combinations on product region and channel. We can use IN predicaate for(product region and channel) .If it was Oracle we would have definitely gone for only Daily data model.
    Could anyone please suggest which is the best option to model this data?

Similar Threads

  1. Replies: 15
    Last Post: 10-07-2012, 10:23 AM
  2. Download and Saving on iOS 5.x devices
    By ImranJ in forum iOS 5
    Replies: 1
    Last Post: 01-11-2012, 04:05 PM
  3. Replies: 0
    Last Post: 01-11-2012, 06:04 AM
  4. 3GS DATA and Wifi Intermittent after upgrade to IOS 5
    By iamPAULTOT in forum iPhone 3GS Forum
    Replies: 6
    Last Post: 01-03-2012, 05:37 AM
  5. Replies: 0
    Last Post: 12-30-2011, 01:41 AM

Posting Permissions