cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: Third prefetch kind - DISJOINT_BY_ID
Date Mon, 30 Jan 2012 11:54:12 GMT
On 30/01/12 10:43 PM, Andrus Adamchik wrote:
>> And does DISJOINT map to:
>>
>>   SELECT * FROM ARTIST WHERE ARTIST_NAME LIKE 'X%' FETCH LIMIT 10;
>>   SELECT * FROM PAINTING WHERE true;
>
> Effectively yes. With some extra nastiness like joins inherited from the parent query.
>
>> Are you proposing this new join type be:
>>
>>   SELECT * FROM ARTIST WHERE ARTIST_NAME LIKE 'X%' FETCH LIMIT 10;
>>   SELECT * FROM PAINTING WHERE ARTIST_ID IN (123, 124, ....)
>
> Yes.
>
> Andrus
>

Some databases don't like the IN clause to be too big. 1024 entries seems to be in my head
about when we hit an error with MS SQL in the past.

How do these solutions work when the user tries to order the results on something across a
to-one join?





Ari



-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message