locked
Speeding up a service calendar query. RRS feed

  • Question

  • I have a WCF application and I am interacting with standard appointments in the service calendar.

    I have a subset of available slots at runtime and I need to load the appointments for a particular day into memory. There could be 8 or so.

    I am looking to save processing time and feel there might be something I can do to lighten my query (I am already using an ExecuteMultipleResponse).

    What I need is:

    • The start of the first appointment for the day;
    • The end of the last appointment for the day;
    • The start and end of the appointment directly before the slot;
    • The start and end of the appointment directly after the slot.
    • A count of the appointment.

    It feels like there should be a quicker way than getting all and looping through; that maybe there is a query that can return just the data I need?

    Thursday, August 28, 2014 11:24 AM

All replies

  • Getting the results using oData or REST will be fastest.

    Getting the data using synchronous plugin  will be best.


    Regards Faisal

    Thursday, August 28, 2014 1:27 PM
  • Thanks for the reply.

    Not really want I'm asking about.  I was wondering if anyone has a clever query to return some specific information from the calendar without having to loop through the results to determine the four possible appointment date-times and the count that I am looking for.

    Realize it may not be possible.

    I can see how you can use ordering and get the top 1 to find the first and last for the day.  That would be 2 queries though.  A similar method mist work for before and after the slot.

    Thought someone might have a clever nested query up their sleeve.

    Friday, August 29, 2014 1:09 PM