Welcome Guest, Not a member yet? Register   Sign In
Performance is concern, Should use CI?
#1

[eluser]nirbhab[/eluser]
Hey All,

Let me first tell that i am big fan of CI, so not able to decide things apart from it, So its a kind request to help me out!


I have a 1 DB and 1 Table which contains more than 50,00,000 Data.

Current architecture is based on inline PHP.

I want to move it to some Framework like CI to improve the search performance.

Or should i use the ORM tool like Doctrine or Propel?

I am not able to understand which one and which should i use one!


Quote:CI or ORM tool, As DB Layer?

Regards and Thanks for your help!
#2

[eluser]xwero[/eluser]
pure php is always faster than a added layer written in php. DB layers are added to abstract sql statements. Most of them add query caching but this is not the way to actually improve the database performance. For that you need to finetune your sql statements and your tables.
#3

[eluser]GSV Sleeper Service[/eluser]
CI will have zero effect on search performance, it's your database doing the hard work there. EXPLAIN your queries, add indices if necessary
#4

[eluser]nirbhab[/eluser]
That means 2 things only to keep in mind:

1. SQL Queries
2. Tables (Cache & Indexing)

It hurts when you are expecting answer as CI..never mind!
#5

[eluser]tchule[/eluser]
Hello,

Using a framework allow you to make cleaner code, but it's also slower than raw PHP. CodeIgniter is the fastest and lightest of the available frameworks. But anyway, I think that the performance you're looking for is not on the PHP side but on the SQL side.

Using an ORM is maybe easier but you don't completely control the SQL that is generated. Doing your own SQL request will allow you to have more control.

If you want to improve search performance, you must play with the database indexes.

Best Regards,

Tchule
#6

[eluser]mihailt[/eluser]
consider using some cache engines such as memcached for example.
#7

[eluser]nirbhab[/eluser]
Hey Mihailt,

Can you please provide some references to "memcached" ?

Regards
#8

[eluser]nirbhab[/eluser]
I had 1 more query, if i have a huge application with this "SEARCH" as one of the other module...

Than i guess i should use a Framework? or anything else?

Please suggest.
#9

[eluser]mihailt[/eluser]
[quote author="nirbhab" date="1229360150"]Hey Mihailt,

Can you please provide some references to "memcached" ?

Regards[/quote]

http://www.danga.com/memcached/ - memcached home
http://www.php.net/manual/en/intro.memcache.php - php interface to it.
#10

[eluser]m4rw3r[/eluser]
The problem with all ORM tools is that they iterate over the whole result set before they return the data.

The same counts for CI's Db abstraction, so the fastest code is to use the PHP functions for your database directly.

But you can still use CI for everything else except for that large table (because it is only there the performance gain is noticeable).




Theme © iAndrew 2016 - Forum software by © MyBB