muzzer Posted March 11, 2014 Share Posted March 11, 2014 I have a modx-based tourism site which I would love to port to PW, but unsure about the database structure. The site lists accommodation and adventure activities, currently has about 1000 (should soon be at max of about 3000) listings. Each listing contains about 60 fields covering such things as business name, description, pricing etc. This listing data is currently held in a single mysql listing table, 1000 rows, 60 fields. Converting this into PW would result in 1000 pages, each page containing 60 fields, which means another 60 tables in the database. Thats fine, but what are the likely effects (speed) for queries - to get data to display one listing currently I have one select query (select * where id = 'x'). How would PW handle this? It would presumably need to query all 60 tables to get all the field data for a single listing? Is this slower and would it be a drag on the server? I have a solid knowledge of databases on a simple level (simple queries etc), but have not used JOINs etc (which I presume PW uses to grab page info) so and a bit lost here as to what is realistically achievable. Some advise would be appreciated - I would love to port this to PW and converting the listings records to PW pages would be sweet from an admin and code development point of view. But I can't help feeling this type of data be kept in a single table as I currently have it? Link to comment Share on other sites More sharing options...
renobird Posted March 11, 2014 Share Posted March 11, 2014 I think ProcessWire would handle this fine. You can use ProCache to make it lightening fast too. See one of Ryan's sites: http://www.villasofdistinction.com Each villa seems to have a lot of data associated. I'm working on an invasive plants species site right now. Each species has about 30 fields (some of which are repeaters). It's still really fast. There are lots of people making very large scale sites around here. I'm sure someone else will chime in to offer additional reassurance. 1 Link to comment Share on other sites More sharing options...
kongondo Posted March 11, 2014 Share Posted March 11, 2014 Not really an answer....can't find it now, but similar questions have been asked before (will post if I find it)... But 1000 rows or 1000 pages is nothing for PW/MySQL. On the other hand, I'd worry about 60 fields on one page if only from a usability point of view...Just guessing here; have never been in that situation 1 Link to comment Share on other sites More sharing options...
apeisa Posted March 11, 2014 Share Posted March 11, 2014 60 fields is peanuts. 5 Link to comment Share on other sites More sharing options...
renobird Posted March 11, 2014 Share Posted March 11, 2014 muzzer, Go for it. You won't be disappointed. Matter of fact, you will probably laugh later that you worried about it. 1 Link to comment Share on other sites More sharing options...
horst Posted March 11, 2014 Share Posted March 11, 2014 60 fields is peanuts. @apeisa: short and concise! Link to comment Share on other sites More sharing options...
muzzer Posted March 11, 2014 Author Share Posted March 11, 2014 Hells, that was quick guys, thanks for the advise. From a usability point of view I'm the only one editing and don't see this as an issue. I realise 1000 pages is nothing, it was more the amount of fields (tables) I was concerned with. Out of interest how is the page data collected when there are 60 fields (ie. 60 tables), is each individual table queried (60 queries?) or is there some cunning query magic going on here? Usability aside, what would be a practical limit for number of fields or is there essentially not one. For example (I know it's nuts but...) could it handle 1000 fields okay? Link to comment Share on other sites More sharing options...
kongondo Posted March 11, 2014 Share Posted March 11, 2014 (edited) Here you go....400 fields! http://processwire.com/talk/topic/4442-pw-performance-with-hundreds-of-fields/ Be sure to read Ryan's comments there.. Also see: http://processwire.com/talk/topic/1527-largest-project-performance-multi-server/?p=13779 Edited March 11, 2014 by kongondo 2 Link to comment Share on other sites More sharing options...
pwired Posted March 12, 2014 Share Posted March 12, 2014 Porting from modx evo or from revo ? If from revo the difference in admin and page speed will be huge ! Link to comment Share on other sites More sharing options...
Joss Posted March 12, 2014 Share Posted March 12, 2014 The way the processwire table structure works will not be an issue for you - I am sure if Ryan has time he will give a proper technical description of what the actual query looks like, but because MySQL is a relational database, it is designed to relate multiple tables together within one query to produce a dataset, so not a problem. MySQL can be behind a certain amount of slowness behind a website with any system, however, as can PHP - obviously by using additional processing you are asking a server to do more work. This is why with any system caching is so important. As mentioned above, Pro Cache is incredibly fast, but even the normal template caching is pretty impressive. However, aside from all that, with the PW API, you wont actually have to worry about how the database queries are made - you just get on with constructing the site how you want. The "lean and mean, fat reducing" API will do the heavy lifting for you. It makes the George Foreman grill look like a toasting fork! (Sorry, was that too obscure?) Link to comment Share on other sites More sharing options...
muzzer Posted March 12, 2014 Author Share Posted March 12, 2014 Thanks for the great replies all. No, the port is from modx Evo, not Revo. When Revo came into beta I had a play around and decided it was not my thing (and as pwired mentioned the admin was so damn slow) that's when I went hunting and was lucky enough to stumble on PW. Man, I actually enjoy doing websites again now Thanks for the explanation on the database Joss, exactly what I was looking for. I will get the site up and running and then look at template caching or ProCache. 1 Link to comment Share on other sites More sharing options...
renobird Posted March 12, 2014 Share Posted March 12, 2014 muzzer, I think you will be compelled to change your profile photo to something happier when you are done. Perhaps smiling and drinking a beer. 4 Link to comment Share on other sites More sharing options...
apeisa Posted March 12, 2014 Share Posted March 12, 2014 Like the rest of us. Although soma's photo is from day after... 2 Link to comment Share on other sites More sharing options...
muzzer Posted March 12, 2014 Author Share Posted March 12, 2014 What! That's already me on a good day 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now