473,382 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

how to get massive amounts of info from the database?

If you're doing extensive formatting of output from a database, then
you can't ask for all of a type of entry ("SELECT * FROM mainContent")
and print it to the screen. On the one hand, it is an annoying thing
to do to one's users, and on the other hand, the problem I've run
into, with only a few hundred records you start to run into PHP's
default 30 second time out.

Besides paging, what are some of the strategies people are using to
get large amounts of data from the database and to the screen?
Jul 17 '05 #1
3 1473
lawrence wrote:
If you're doing extensive formatting of output from a database, then
you can't ask for all of a type of entry ("SELECT * FROM mainContent") and print it to the screen. On the one hand, it is an annoying thing
to do to one's users, and on the other hand, the problem I've run
into, with only a few hundred records you start to run into PHP's
default 30 second time out.


Use limit to limit the number of records on each page .
select * where 1 limit $startlimit,100 Paging is a good idea. DO you
really want to display 1000 records on a single page ? Who will even
pay attenton to that much data ?

On a sidenote do read "The Case Against SELECT *"
http://www.parseerror.com/sql/select*isevil.html

Jul 17 '05 #2
lk******@geocities.com (lawrence) wrote in message news:<da**************************@posting.google. com>...
If you're doing extensive formatting of output from a database, then
you can't ask for all of a type of entry ("SELECT * FROM mainContent")
and print it to the screen. On the one hand, it is an annoying thing
to do to one's users, and on the other hand, the problem I've run
into, with only a few hundred records you start to run into PHP's
default 30 second time out.

Besides paging, what are some of the strategies people are using to
get large amounts of data from the database and to the screen?


If PHP times out in 30 seconds, you must be pulling *huge* data.
People won't usually pull such huge data.

Some scaling solutions:
1. Page caching - One time caching
2. Query caching
3. DB cluster
4. Load balancers.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com
Jul 17 '05 #3
"lunatech" <r.*******@gmail.com> wrote in message news:<11**********************@z14g2000cwz.googleg roups.com>...
Use limit to limit the number of records on each page .
select * where 1 limit $startlimit,100 Paging is a good idea. DO you
really want to display 1000 records on a single page ? Who will even
pay attenton to that much data ?

On a sidenote do read "The Case Against SELECT *"
http://www.parseerror.com/sql/select*isevil.html


Couldn't reach the site you suggest. However, I agree with the
sentiment. My software is slow because I used SELECT * too much. I'm
hoping to have time to do some optimization early next year, and the
main thing I'll be looking at is fine tuning what information I'm
asking the database for.
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: nasht | last post by:
Hi, I'm trying to make a newsletter application in php (using mail() ). This application is supposed to look in a MySQL database and generate a list of emails and first names. Then it should...
5
by: Julia Baresch | last post by:
Hi everyone, I haven't found any reference to this problem on this group or in Access 97 help. I hope someone here knows this - probably a simple thing, but not obvious. I designed a query to...
3
by: Dig314 | last post by:
I need to Total the amounts for each Property ID in a table. All the amounts are stored as positive in the database. Based on a transaction code, the amount should be added or subtracted. There...
2
by: Dennis C. Drumm | last post by:
What is the best way to add several pages of text to a readonly TextBox? The text does not change and was created in a Word rtf document but could as easly be put in a ASCII text file. Can this be...
3
by: Brent | last post by:
Hi, I'm wondering if it is good to use datasets for large amounts of data with many users. I'm talking tables with 130,000 records and 15 columns. And we want current data, so no cached data....
6
by: shaqattack1992-newsgroups | last post by:
Hello Everyone, I'm using the following on a form in my database: =(-Int(-Sum((IIf(=Yes,((*)+()), (((*)+)*1.06))*100))))/100 In this case, I want to calculate a total for an order. If...
7
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're...
1
by: Nick Craig-Wood | last post by:
I've been dumping a database in a python code format (for use with Python on S60 mobile phone actually) and I've noticed that it uses absolutely tons of memory as compared to how much the data...
7
by: Ming | last post by:
For example, 100,000 records, each record has 10 fields and may belong to one or more categories. How shall I save those records in DB? I think it is a very typical concern for most online shopping...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.