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

[eluser]Nick Husher[/eluser]
On the other hand, unless you're doing a search query for '*' or something that contains a huge result set, your performance overhead isn't as bad as it could be. ORM tools, particularly ones that have aggressive data retrieval schemes, definitely multiply that overhead, though.

The best way to improve query times is to reindex your data for faster access and use caching techniques to capture common searches. There are plenty of resources to help out with that, but not here. It's outside the scope of a PHP framework. Wink
#12

[eluser]Michael Wales[/eluser]
In this particular example, the framework is going to have little effect on your performance (except for the generic overhead any framework adds). Your primary concern is going to be optimizing your database and your queries.

I would not go with an ORM solution, this will definitely slow down your database performance. CodeIgniter's ActiveRecord is nothing more than a query builder, so you could easily use it without decreasing your performance.
#13

[eluser]Unknown[/eluser]
[quote author="nirbhab" date="1229358078"]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![/quote]

Two fundementals questions:

What's the database technology?
What are you doing with your data?

If it's only data retrieving, you should be ok.
If you are doing operations like SUM, consider creating temporary tables where you would store computed data.

Don't forget to put index in columns you are using to retrieve data. It will increase the size of the database but it should speed considerably your queries.
#14

[eluser]nirbhab[/eluser]
Thanks all for your suggestions and ideas,

I have decided to use CI, use its basic MVC architecture for code maintenance and won't use the Active Record class for building query, rather will write the optimized queries by myself.

But keep high use of Cache and Benchmark Class for faster response and measure the performance for the application.

Meanwhile there is 1 more query:
Quote:Suppose my table have 3 Fields:
1. ID (Primary Key-INT-11)
2. Description (Text)
3. Intro (varchar-200)

Can you please tell me where should i add the indexes as the Keyword will be searched in Description, "Description LIKE '%$keyword%'"?

Engine: INNODB
#15

[eluser]narkaT[/eluser]
you maybe want to understand what indexes do Wink

there are also functions to do fultext-searches.

the fulltext-index is the only option you have when using the 'text' datatype.
#16

[eluser]nirbhab[/eluser]
Gr8 Links thanks dude! They will surely help me out.

But if you could provide me answer here in this use case (previous post)...it would be highly appreciated.

Thanks
#17

[eluser]narkaT[/eluser]
[quote author="nirbhab" date="1229444413"]But if you could provide me answer here in this use case (previous post)...it would be highly appreciated.[/quote]

put a fulltext-index on the 'Description'-field Wink

you should also test how the fultext-search functions performs in comparison to the LIKE statement.
I'm not sure if LIKE uses fulltext-indexes.
#18

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

Can you please provide some references to "memcached" ?

Regards[/quote]

hope this helps: http://zeratool.com/blog/2008/01/24/php-...memcached/




Theme © iAndrew 2016 - Forum software by © MyBB