|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here! |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
What are the main factors and combined sub factors that will effect the speed at which pages will load using php to call and mysql to deliver multible queries(between 100 and 500 per page). I am at the point in my project where I am ready to write code and create the tables. Are there any specific places to look for answers. I have been looking at mit.edu
site for more answers. Am I way off base or are these things I should be thinking about at this point. Thanks in advance for input and opinions. Mike |
|
||||
|
Is there a reason you need so many queries? Most information can be extracted with a handful of well crafted queries. mysql.com would be a place I'd look. also read up on database normalization and optimization. If you need any help just ask.
__________________
www.squitosoft.com - PHP development site. featuring Squito Gallery. a php driven photo gallery. www.rgfx.net - Specializing in Internet solutions, including Html authoring, Interactive Web sites, 3D/2D Graphics and animation. |
|
||||
|
Quote:
__________________
Irony: That for most people the most "trusted" web site on the planet is for a company the has been convicted of criminal activity. Both Security and SuSe start with "S". www.oldslides.com |
|
|||
|
How long is a piece of string is the answer. As with anything there are so many variables to take into account. Server type, server speed, connection speed, and the code itself. It depend entirely on how your code is scripted and what functions are used. As just one simple example read the php manual on ereg and preg funtions. Similar function yet preg is a whole load faster. Code execution times can be dramatically reduced by a thoughtfull approach.
|
|
|||
|
Hi Redcircle, mushroom and php~pro
I meant to say results not queries. There are places in the site when finished, that will have some sub_catagories with up to 125 or more products in them, each product will be displayed with for example product_id, thumbnail, name or title of product, description, price and so forth. On that same page I will issue another query that will fill in page title, meta_description and meta_keywords. The third query would be to fill in links for related items. That is why I am concerned with the load time. By the way what is object oriented programming, is it where you bundle multible results together and put them all ready to go into there own table. I will look into preg as the better function. |
|
|||
|
Preg was merely an example of how php function differ in execution time.
With regards running out 100 products to a single page, you are likely to annoy your custmers with some major scrolling. Divide the results and split them into more managable amounts. Use paging to provide numbered page links, or allow the customer to narrow their queries right down to a very suitable item. |
|
|||
|
If you are working with 100 results from a query, it should not take too long. I agree with the above, if you are showing 100 items per page, that is too many. You can write a query to return say 10 results.
SELECT * FROM table LIMIT 0,10 |
|
|||
|
wmabear54,
I have and continue to wonder about that question and concern, wondering how fast something will be. You may be surprised to see what happens when you just go ahead and program it as see if you can live with the outcome. I'm afraid I often resorting to "whatever I can figure out" which often means many queries in building a page. In some cases I probably should go back and be more efficient, but.... For example, see http://www.twinrockerhandmadepaper.c...s&grp=Pigments IIRC, there are 2 queries for each of the 72 "click price to add to cart" links in the pigments table, plus a handful more to rebuild the menus. It doesn't take too long (imo) to create that page. A lot less than dragging up images. My point is that php/mysql is pretty fast. Faster than one first think. Go ahead and program it. Probably it will be alright. {And, yeah, I'm always open for encouragement or suggestions on how to make that table/page faster.] Good luck, refrost[/url] |
|
|||
|
I dont think that was what wmabear was exactly asking.
Quote:
To further answer your query wmabear if you do need this number of queries you would be faster making the query from inside the loop and drawing a result for each succession. My advice is definetly go with pagination to break page sizes down, and create a multi tier css child menu to work with MySQL to refine query size from menu. Everybody wants everything now in this world Im afraid. |
|
|||
|
PHP~PRO
Thanks for the tips on making faster querys they will come in handy at some point. You knew exactly what I wanted to know. But I am working on just getting things to work right now. Back to the basics again. And welcome to the forum's Refrost Mike |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |