We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Huge database

Development and Programming

w84me's avatar
w84me
95 posts
14 years ago
w84me's avatar w84me

Hi all,

Can EE2 handle a database with more than 3 million channel entries? What I want is to import a csv with all the cities in the world which is about 3m entries.

If not how should I do this? Should I make custom table cities and a custom field type that load its data from the custom table and then use the ids of this table as channel entry?

Thanks in advance

       
w84me's avatar
w84me
95 posts
14 years ago
w84me's avatar w84me

I manually entered the cities in the db. I’ve populated the exp_channel_titles and exp_channel_data and now when I try to go to edit php memory (256MB) gets exhausted…..

       
w84me's avatar
w84me
95 posts
14 years ago
w84me's avatar w84me

Does EE make a query like “Select * from exp_channel_titles” without LIMIT?

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
14 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

If you’re just storing city names I would recommend creating a unique table (or more) just to store the data. That way you can limit that table’s schema to just support the necessary field length and not waste space in the channel_titles and channel_data.

Does EE make a query like “Select * from exp_channel_titles” without LIMIT?

Not that I’m aware. You can enable the output profiler to see each query getting run though. You can find that under Admin > System Preferences > Output and Debugging Preferences.

       
w84me's avatar
w84me
95 posts
14 years ago
w84me's avatar w84me

Thnx for the answer. If I do this I need to make a custom fieldtype in order to show the data in the channel edit?

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
14 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

That’s correct. And since it’s a lot of data you can get pretty creative in how you design the interface through which the data is selected and displayed.

With this approach you can also easily create a template tag for select options etc.

       
Envision's avatar
Envision
18 posts
14 years ago
Envision's avatar Envision

Hi w84me,

Did you complete this project by manually adding 3 million entries into exp_channel_data and exp_channel_titles ? Or, did you use something like Data Grab?

We need to import 500k entries into EE. We are having problems with Data Grab (won’t do more than 300 at a time) and we are thinking of editing the database manually.

Any advice?

Thanks!

       
w84me's avatar
w84me
95 posts
14 years ago
w84me's avatar w84me

I’ve entered the data manually from command line. I haven’t tried Data Grab but raw SQL is always faster and more reliable.

       
Envision's avatar
Envision
18 posts
14 years ago
Envision's avatar Envision

We had to populate a database with 400K entries. Luckily we had the data available as a CSV file so I used the MySQL INFILE to load it up. One issue we encountered was making allocating enough disk space.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.