Forget about this. PEBKAC. Works fine, problem with which database was 
being connected to.


On Tuesday, August 5, 2014 9:12:44 AM UTC-4, Seamus Minogue wrote:
>
> I have a database I created and populated using the tinkerpop blueprints 
> API.  
>
> id is an Integer
> date is a java.Util.Date 
>
>  Vertex vip = graph.addVertex("class:UserDay", "ID", id, "DATE", date);
>
> When I wish to query the database I am using straight orient SQL becuase I 
> have noticed it is MUCH MUCH MUCH faster. For example a query using 
> graph.query().has()...vertices() may take 12 seconds... well 12 seconds to 
> iterate over the iterable result (lazy queries to DB)... the same query in 
> straight orient SQL its taking like 180 milliseconds. I digress... 
>
> So my query to orient:
>
> String sql = "select sum(PAGECOUNT) from UserDay where DATE >= 
> date('2014-08-01 00:00:00:000')";
>
> List<ODocument> result = graph.getRawGraph().query(new OSQLSynchQuery(sql
> ));
>
>
> Results in the sum of PAGECOUNT for the entire database.
>
>
> However when I use = rather than >= or >
>
> String sql = "select sum(PAGECOUNT) from UserDay where DATE = 
> date('2014-08-01 00:00:00:000')";
>
> List<ODocument> result = graph.getRawGraph().query(new OSQLSynchQuery(sql
> ));
>
> I get the sum of PAGECOUNT for that one day.
>
>
> Am I doing something wrong or is this an issue with how tinkerpop stores 
> dates vs the query language? Its odd that it works for = but not for the 
> other comparators.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to