1
phillipd
Is there a limit for the number of "inserts" during a module installation?
  • 2004/10/26 4:12

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I need to insert about 50,000 records when installing my module but the installation fails with no errors unless I limit my "inserts" to a small number. Is there a limit on how many inserts I can do at module install time? If so, how do I overcome this without doing the inserts manually?

Thanks

Doug P

2
hervet
Re:Is there a limit for the number of
  • 2004/10/26 4:46

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


May be the execution time of your script is out ?

3
phillipd
Re:Is there a limit for the number of
  • 2004/10/26 4:49

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


Would this be a php limit? I upped the php limits:

max_execution_time = 120
max_input_time = 120
memory_limit = 16M

Restarted apache, nothing changed. The installations fails pronto, like it never even tries to do the inserts if there are more than about 1000 of them.

Reading the insert's into MySQL manually works fine.

Here is a sample:

CREATE TABLE gis_zip (
zip_id int(15) unsigned NOT NULL auto_increment,
zip_zip varchar(255) NOT NULL default '',
zip_x float NOT NULL default '0.0',
zip_y float NOT NULL default '0.0',
PRIMARY KEY (zip_id)
) TYPE=MyISAM;

INSERT INTO gis_zip VALUES (1,'95420',-123.78,39.36);
INSERT INTO gis_zip VALUES (2,'96703',-159.31,22.16);
INSERT INTO gis_zip VALUES (3,'96705',-159.55,21.90);
INSERT INTO gis_zip VALUES (4,'96714',-159.50,22.20);
INSERT INTO gis_zip VALUES (5,'96715',-159.34,21.99);
INSERT INTO gis_zip VALUES (6,'96716',-159.59,22.03);
INSERT INTO gis_zip VALUES (7,'96722',-159.51,22.15);
INSERT INTO gis_zip VALUES (8,'96741',-159.51,21.95);
INSERT INTO gis_zip VALUES (9,'96746',-159.36,22.11);
INSERT INTO gis_zip VALUES (10,'96747',-159.62,21.91);
INSERT INTO gis_zip VALUES (11,'96751',-159.31,22.06);
.
.
.
INSERT INTO gis_zip VALUES (41511,'04657',-67.37,45.01);
INSERT INTO gis_zip VALUES (41512,'04671',-67.16,45.06);
INSERT INTO gis_zip VALUES (41513,'04694',-67.46,45.09);


Doug P

4
hervet
Re:Is there a limit for the number of
  • 2004/10/26 4:50

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


a configuration's limit

5
phillipd
Re:Is there a limit for the number of
  • 2004/10/26 4:57

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I'm sorry, I don't understand. What is "A configurations limit". Could you please be more specific?

Thanks

Doug P

6
hervet
Re:Is there a limit for the number of
  • 2004/10/26 6:04

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Change the max_execution_time's value to a greater value, much greater.

7
Mithrandir
Re:Is there a limit for the number of

50.000 queries is quite a bit.

I have seen 10.000 queries working on my test platform (2500+, 512 MB RAM, default PHP configuration) but 50.000 may be a little tougher.

If this is a one-time off, you will be using this to install the module, try setting the max_execution_time to a gigantic value and try again (then make yourself a cup of coffee and wait) - then set the max_execution_time back to a more usable value for running the site.

If I may be so blunt, what is the purpose of all those queries? What kind of module and data is it? Could it be broken down into more manageable chunks?

8
phillipd
Re:Is there a limit for the number of
  • 2004/10/26 13:54

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I'm writing a GIS module where the data forms a URL passed to a ESRI website for displaying a map viewer. The data is zipcode, layer and US City data. I don't have to insert the data at module install time but it is handy to do so. I tried upping the limits and it didn't work. I'll just create the tables at module instal time and upload the data manually.

Thanks

Doug P

Login

Who's Online

306 user(s) are online (218 user(s) are browsing Support Forums)


Members: 0


Guests: 306


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits