In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0001147 [In-Portal CMS] Database feature request N/A 2011-10-17 08:31 2012-07-25 05:32
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.2.0-B1
Status closed Product Version 5.1.3 Target Version 5.2.0
Time EstimateNo estimate
Summary 0001147: Methods for processing large data amounts from database
Description In-Portal nice $this->Application->Conn->Query method, that accepts SQL and returns an array of data to used right away. This proved very useful for small sets of data.

However, when you need to process 2000 or more records, then this method will eat up a lot of memory while transforming sql result into PHP array.

Attached methods contains kDBConnection::QueryRaw and kDBConnection::GetNextRow methods, that basically does the same what mysql_query and mysql_fetch_assoc methods. Also kDBConnection::Destroy method was changed to accept incoming recordset resource, that needs to be destroyed.


Here is usage example:

$rs = $this->Conn->QueryRaw($sql);

while ( $row = $this->Conn->GetNextRow($rs) ) {
    echo $row['userid'];
    echo $row['fullname'];
    echo $row['userstatus'];
}

$this->Conn->Destroy($rs);
Additional Information
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-dev/ktW1fmOoUTM/discussion
Change Log Message Adds methods for large data amounts (from database) processing
Estimate Points 1
Attached Files patch file icon db_class_for_large_data_set_512.patch [^] (3,003 bytes) 2011-10-17 08:31 [Show Content]
patch file icon db_class_for_large_data_set_513.patch [^] (2,873 bytes) 2011-10-17 08:31 [Show Content]
patch file icon db_class_for_large_data_set_520.patch [^] (3,736 bytes) 2011-12-08 04:14 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0004220)
Dmitry (manager)
2011-12-07 18:07

Tested okay on 5.1.3. Please update and apply to 5.2.0 and commit.
User avatar (0004228)
alex (manager)
2011-12-08 04:14

Fix committed to 5.2.x branch. Commit Message:

Fixes 0001147: Methods for processing large data amounts from database
User avatar (0005031)
alex (manager)
2012-07-25 05:32

Since 5.2.0 version was released.

- Related Changesets
In-Portal CMS: 5.2.x r14845
Timestamp: 2011-12-08 04:14:28
Author: alex
Details ] Diff ]
Fixes 0001147: Methods for processing large data amounts from database
mod - /in-portal/branches/5.2.x/core/kernel/db/db_connection.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-07-25 05:32 alex Note Added: 0005031
2012-07-25 05:32 alex Status resolved => closed
2011-12-08 04:14 alex Note Added: 0004228
2011-12-08 04:14 alex Status reviewed and tested => resolved
2011-12-08 04:14 alex Fixed in Version => 5.2.0-B1
2011-12-08 04:14 alex Resolution open => fixed
2011-12-08 04:14 alex Changeset attached 5.2.x r14845
2011-12-08 04:14 alex File Added: db_class_for_large_data_set_520.patch
2011-12-07 18:07 Dmitry Note Added: 0004220
2011-12-07 18:07 Dmitry Assigned To !COMMUNITY => alex
2011-12-07 18:07 Dmitry Status needs testing => reviewed and tested
2011-10-22 05:27 alex Estimate Points => 1
2011-10-17 08:34 alex Assigned To => !COMMUNITY
2011-10-17 08:34 alex Developer => alex
2011-10-17 08:34 alex Status active => needs testing
2011-10-17 08:34 alex Reference => https://groups.google.com/d/topic/in-portal-dev/ktW1fmOoUTM/discussion
2011-10-17 08:31 alex File Added: db_class_for_large_data_set_513.patch
2011-10-17 08:31 alex New Issue
2011-10-17 08:31 alex File Added: db_class_for_large_data_set_512.patch
2011-10-17 08:31 alex Change Log Message => Adds methods for large data amounts (from database) processing



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker