HI everybody

I used both mySql and Oracle 9i with PHP,

I am working on a project that requires me to work with PHP and Oracle 9i.
I found that Oracle 9i is too slow compare to mySql

is oracle w/ php slow?
What's is the problem?
Why?

Thank You

    Hi,

    MySQL is very fast when it comes to simple SELECT statements. The speed depends heavily on the queries. But in nearly all projects I had so far I hadn't a noticeable difference in speed.
    So I guess that you might need to add some indexes to the Oracle 9i tables. In most cases these problems are caused by missing indexes.

    Which type are the queries of (complex joins or something like that) ?

    Thomas

      Thank you tsinka for your reply
      Yes, they are complex statements

      However I used adodb classes

      does adodb slow down the database?

        I don't think so ... give me an example of a query that is slow.

        Thomas

          does adodb slow down the database?

          Yes!

          Queries are a lot faster without adodb. If the speed is bad, consider rolling your own abstraction class with only the features you need. It will be a lot quicker this way.

          HTH
          Melody

          Oh and I agree, get some indexes on the columns as it makes a huge difference (complex query in postgres that i run = 1.4 seconds with index, 37.8 seconds without index!)

            Thank You melody for your reply

            another Q: plz
            Is there any better class than adodb, that works with ORACLE?

            Thank You

            give me an example of a query that is slow

            Thomas,

            I am have a script that runs more that 1000 queries
            it takes about 2 s w/ mysql; however, it takes about 20 s w/ ORACLE.

            Thanks Thomas,

              If there's that much difference in query times then indexes or overhead are almost certainly the cause. Create indexes on the columns you search and it should be a lot quicker. If these are 1000 separate queries you're performing, it may be the overhead of invoking an Oracle instance so many times. Can you merge queries to make one big one or just a few? Either that, or try a persistent connection.

              That said, if you do want to change AdoDB, then have a look at http://www.phpclasses.org. There should be something there. Metabase may be worth looking at. Though in this case, i'd probably just stick with AdoDB and get some indexes made on the columns and try to merge the queries.

                Write a Reply...