Hi John,

so what I need to perform this kind of queries is something like
HAVING clause? Or I can just take the resulting table and run the
filter, right? But in such case I'm worried about memory requirements.
To be a little more specific, I can do

result1 = Select sum(e0id1) as bytes, count(*) as count from testdata
where bytes = 40
result2 = Select bytes, count from result1 where bytes = 40

But the result1 table needs to fit into the memory, right? So my
question is, is there any other way to perform this kind of query
without higher memory requirements?

Thanks,
Petr

On 6 October 2012 06:43, K. John Wu <[email protected]> wrote:
> Hi, Petr,
>
> The behavior of FastBit in this case is not graceful, however, the
> query is not well formed.  Let me explain.
>
> Your query can be rewritten as
>
> Select sum(e0id1) as bytes, count(*) from testdata where bytes = 40
>
> The basic problem is that bytes is the result of the query, but it is
> also used as part of the where clause.  There is no way to evaluate
> the where clause because it depends on the result of the query.  Oh,
> well, hope it makes sense.
>
> Will see what I can make the error message more obvious..
>
> John
>
>
> On 10/5/12 1:10 AM, Petr Velan wrote:
>> Hi John,
>>
>> I decided to take advantage of named columns in select clause. I tried to use
>>
>> table->select("sum(e0id1) as bytes, count(*) as fl", "bytes = 40");
>>
>> but the result is segmentation fault. Is it possible to use named
>> columns in the where clause?
>> Please find the test data and short program attached.
>>
>> Best regards,
>> Petr
>>
>>
>>
>> _______________________________________________
>> FastBit-users mailing list
>> [email protected]
>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to