IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Are there indexes on other columns?
I'm going to take a WAG as to how it could be that slow. I have no idea whether this is what is happening, but it is a combination that resembles programming decisions that I've seen that makes your performance at least physically possible.

In some databases, some types of indexes force data to physically be ordered according to that field. If the blob is being stored with the table row (most databases don't, but MySQL might) this would mean that editing a row in the middle involves rewriting the data for the whole table. Even worse, if MySQL is detecting the need for the rewrite every extra page or so, then it would have to do this rewrite many times for a single insert.

I'd suggest trying to create some simple tables moving towards the full definition of yours, and see if you can find out what combination of circumstances triggers the performance problem. Then think about how to lay out your data to avoid the issue. (Possibly break the blobs out into their own table and then replace the original table by a view that does a join.)

Cheers,
Ben
To deny the indirect purchaser, who in this case is the ultimate purchaser, the right to seek relief from unlawful conduct, would essentially remove the word consumer from the Consumer Protection Act
- [link|http://www.techworld.com/opsys/news/index.cfm?NewsID=1246&Page=1&pagePos=20|Nebraska Supreme Court]
New Here's the table
CREATE TABLE `appraisal_files` (\n  `idnum` bigint(20) unsigned NOT NULL auto_increment,\n  `time_stamp` timestamp(14) NOT NULL,\n  `reference_number` bigint(20) unsigned NOT NULL default '0',\n  `source_filename` varchar(128) NOT NULL default '',\n  `source_extension` varchar(5) NOT NULL default 'PDF',\n  `source_data` longblob NOT NULL,\n  PRIMARY KEY  (`idnum`),\n  KEY `time_stamp` (`time_stamp`),\n  KEY `reference_number` (`reference_number`)\n) TYPE=MyISAM

This already is the separate table for the blobs.
===

Implicitly condoning stupidity since 2001.
New What are the indexes though?
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Called KEY in mysql
  PRIMARY KEY  (`idnum`),\n  KEY `time_stamp` (`time_stamp`),\n  KEY `reference_number` (`reference_number`)

===

Implicitly condoning stupidity since 2001.
New Oh, heh. Never mind.
Seems silly for them to invent their own syntax...
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Why would a database insert take >40 seconds? - (drewk) - (7)
         No idea, just a wild guess - (Meerkat) - (1)
             Full table scan is faster - (drewk)
         Are there indexes on other columns? - (ben_tilly) - (4)
             Here's the table - (drewk) - (3)
                 What are the indexes though? -NT - (admin) - (2)
                     Called KEY in mysql - (drewk) - (1)
                         Oh, heh. Never mind. - (admin)

Anybody want a peanut?
82 ms