Jump to content

SQL Comlicate querys VS PHP Simple manipulation!


mamad876

Recommended Posts

Hello all,

 

I have a problem, that I thought maybe some one have a experience it it.

First lets explain the situations:

I'm currently working on a big online database project with LAMP.

There is a database with about 10 tables, average 15 columns each.

This tables contain information about employees in an organization.

There will be lots of different reports regarding to this informations.

This is fully object oriented based programing in PHP.

So, here comes the challenge:

is it better to make on simple query to database  like :

 SELECT *, ... FROM some_table INNER JOIN ... 

and then manipulate data with PHP classes and functions to make reports

OR

in the other hand making all reports based on complicated query and relay completely on database results?

 

thank you very much in advance.

regards,

MAMAD

Thank for reply,

 

I've just did a time checking with both ways, almost the same result???

I've just thought you are right with that but the figures are little different!!!

 

Testing execution time with objects: 0.1707

Testing execution time with query:  0.1848

 

The query prepared to get the same result, as my object oriented system, provides.

 

So any answer?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.