views:

28

answers:

1

Hi i'm using this query for get next facebook events of a user:

       FB.Data.query("select eid,name,start_time,location,venue,
pic_small,pic_big,description 
    from event WHERE eid IN (SELECT eid FROM event_member WHERE uid={0})
 AND start_time >= " + from + " ORDER BY start_time LIMIT 10", uid);

But for users with many events this is very slow. How can i do to speed it?

thanks

A: 

Well, I haven't used the Facebook API, but from the query I can tell its taxing their system a bit more than a "straight data grab" so they might impose an intentional wait time on this sort of query.. why not just do a more basic one and then do the processing in your script? For example, I don't know what langauge you are using, but you could easily do the ordering on your own side (order by start time)... maybe just play around with it a bit and impose less constraints and see if its faster, at least this way you have a better idea of what you're working with as far as if they impose waits, etc...

Also, what type of set-up are you accessing this from? Is it a cloud server, local machine, shared hosting? Shared hosts sometimes do weird things in imposing limitations on speeds so if you can try it from a different setup that may help too.

Rick