Scalability?

Our events database has about a thousand events over the last 3 years. We do want to keep all this historical information around.

My question is, does the scheduler do anything fancy like lazy loading of events? Do I need to load everything all at once?

(I am using the PHP connector)

do anything fancy like lazy loading of events?
Yep, add something like next on the client side

scheduler.setLoadMode(“month”)

there is no need to change anything on server side.
With such settings scheduler will load data for current month only , and will load extra data only when user will navigate to different month.

docs.dhtmlx.com/doku.php?id=dhtm … al_loading

Cool, in my PHP script do I need to do anything to handle this? Or is it done for me?

If you are using connector - server side will work without extra commands|modifications.

Got an SQL error when I tried this. Looks like it is generating a query with a where clause that is looking for a field called 'end".

Remember our database has events with a start date and duration instead of an end.

I am guessing that is a problem…

Couldn’t/shouldn’t it be just looking for start dates in a specific range when doing dynamic loading?

It need both start and end date to get the correct range of events.
You can try to customize code as you wish. Client side will send requests as described here
docs.dhtmlx.com/doku.php?id=dhtm … al_loading

So you can use “from” and “to” parameters in your custom queries.

MY PHP script was already using custom SQL:

        $sql = "SELECT id, start, duration, title from NVP_events WHERE `start` >= '" . $last_year . "'";
        $scheduler->render_sql($sql, "id","start,end,title, duration, id(summary)");

For now I am basically just limiting the events to the last and current years.

But when I enable dynamic loading I start getting SQL errors.

Before render_sql you can call something like

unset($_GET['from']); unset($_GET['to']);

so connector will not receive information about necessary date range, and will not do any sql manipulation

Ah, good one!

thanks!