You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Marty Phee <mp...@jump-technologies.com> on 2002/01/17 17:43:49 UTC

Date in sql

Using Turbine how should I handle dates with my Criteria objects.

We currently have an ASP app hitting a Sybase server.  We bought the app
along with a bunch of other stuff just to get things going.

Like I said the app is hitting Sybase, but I want to move it to Oracle
in the future since most of our db's are Oracle.  Sybase and Oracle
don't handle date formats in the sql the same.

IE:

Sybase: criteria.add( TNoticeEntryPeer.POSTED_DATE, "01/01/2001" );

Oracle: criteria.add( TNoticeEntryPeer.POSTED_DATE,
"TO_DATE('01/01/2001', 'mm/dd/yyyy'" );

Should I create a utility class for this, or does Turbine have something
to handle this.  I wasn't able to find anything.



Funny story:  Along with this app we bought another ASP app for gas
(natural gas) pipeline.  Web server in Virgina, db in Tulsa.  The asp
app has been dieing for our clients all the time since it went live
1/1/02.  I created a test ASP page to run a given SQL, and a
Turbine/Velocity page to run the same SQL.

ASP: 3.3 seconds
Turbine: 0.117

Tried it on a dev webserver on the same rack as the db.  ASP: 0.22
secs.  Turbine was still faster being 2k miles away for the db.

Needless to say I've convinced my client that further apps should be
writen in Java.

Just out of curiousty.  Anyone know why ASP pages are soo slow in this
situation?  (db and webserver in diferent locations)  Can't be the
network since the java apps don't have any problems.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Date in sql

Posted by Marty Phee <mp...@jump-technologies.com>.
Good read...  I never believe anything coming from Redmond, and others
with a grain of salt.

Not to get too off topic, but the software vendor keep saying that it
must be our client internet connections, the db isn't tuned, our wan
connection to the webserver must be the problem...

I keep pointing out to them that I'm running my test from the webserver
( MS terminal server connection), and from my broadband connetion to the
test pages.  Results are the same.  ASP +3 sec - Java 0.117 seconds. 
I've had others around the country try my samples, and the results are
the same.  I can't see what the software is doing because it's all COM
objects, but my test page is staight ASP.


On Thu, 2002-01-17 at 11:30, Danny Angus wrote:
> >Just out of curiousty.  Anyone know why ASP pages are soo slow in this
> >situation?  (db and webserver in diferent locations)
> 
> Don't tempt me ;-)
> 
> But seriously there was a comparison of .NET and J2EE made by M$ recently,
> and some interesting things came out in the resulting flak.
> I don't know where either the original comparison or much of the flak is
> (the MSDN pages have mysteriously vanished today, not even the customary
> redirect, which hints at server downtime) but you might find this
> interesting..
> http://www.theregister.co.uk/content/4/22781.html
> 
> 
> 
> > Can't be the
> >network since the java apps don't have any problems.
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Date in sql

Posted by Danny Angus <da...@thought.co.uk>.
>Just out of curiousty.  Anyone know why ASP pages are soo slow in this
>situation?  (db and webserver in diferent locations)

Don't tempt me ;-)

But seriously there was a comparison of .NET and J2EE made by M$ recently,
and some interesting things came out in the resulting flak.
I don't know where either the original comparison or much of the flak is
(the MSDN pages have mysteriously vanished today, not even the customary
redirect, which hints at server downtime) but you might find this
interesting..
http://www.theregister.co.uk/content/4/22781.html



> Can't be the
>network since the java apps don't have any problems.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>