From: Stranne <rad...@ho...> - 2003-04-15 17:16:05
|
Hi everyone, I'm new to this list and have been trying out Tiki 1.5 for = about a month. After receiving 1.6 I started to browse through the code, trying to see = if there was a reason other than Smarty for Tiki's somewhat low performance. I found that there is a consistent use of the following code = pattern(pseudo-code): select id from table while(rowsLeft()) { select data from otherTable } instead of select data.otherTable from table, otherTable where = otherTable.id=3Dtable.id The first solution gives somewhat cleaner code (since the innermost = select is often hidden in a function call), but does not give the database engine a chance to optimize and gets a = lot of overhead from the high number of queries. Together with appropriate indexes the second version offers = superiour performance. My question is, is there a deliberate choice (and some form of = consensus) to use the first solution? I also found out that the overhead (from the current solution) can be = greatly reduced using persistent database connections. In tiki-db.php, replace the row $dbTiki =3D DB::connect($dsn); with $dbTiki =3D DB::connect($dsn, true); /Stranne |