tags:

views:

170

answers:

2

In Facebook query language(FQL), you can specify an IN clause, like:

SELECT uid1, uid2 FROM friend WHERE uid1 IN (1000, 1001, 1002)

Does anyone know what's the max number of parameters you can pass into IN?

Thanks.

A: 

There shoud not be a maximum number of parameters as there isnt in SQL IN as far as I know.
http://www.sql-tutorial.net/SQL-IN.asp

just dont use more parameters than you have values for the function to check because you will not get any results (dont know if it will give away an error as I never tried to).

TheChange
I believe there is a limit.
Faruz
@Faruz: I dont really know, just guessed. Any Solution outrunning the limit maybe should be done in a better way
TheChange
In some SQL servers, the limit is the length of strings their SQL parser can handle, not the number of items in the "IN" clause. I'm not sure what the specific query-length limits are though.
Mark B
+1  A: 

I think the maximum result set size is 5000

Ceilingfish
Why? Do you have a citation?
Oddthinking
I'm going from the facebook developer boards http://forum.developers.facebook.com/viewtopic.php?pid=216570
Ceilingfish

related questions