MySQL Forums
Forum List  »  PHP

Re: Concat Occasionally Drops a Character or Two
Posted by: Jonathan Shaltz
Date: September 28, 2009 05:30PM

And I appreciate your willingness to work on this frustrating problem!

I'm calculating the length of chunks *before* escaping. I'm about to run out of the house but I'll check both values later this evening and post the results.

I judge that there is no specific character being trimmed, because the 1st and 10,000th character of the problem chunks are not any particular value, such as 0x00, space, or quote. It is entirely possible that it's cutting a byte from the middle of the chunks, but if there was a single byte value that was being dropped, I'd expect that roughly one in every 256 bytes from the whole would be dropped, assuming that the files (JPEGs, MOVs) have evenly distributed contents from 0x00 to 0xFF.

There are several parameters that limit the size of data sent to MySQL, from the browser to PHP to MySQL. I don't remember the details, as it was a couple of months ago when I worked on that, but I believe I have them turned up as high as I can without changing server-wide settings which are not available to me on a shared web host.

Huh, would it be faster to ORDER BY than to run a subquery? Most of my optimization experience is with MSSQL, I'm sure I'd be surprised by what does and doesn't work in MySQL. Fortunately for me, the sites I'm working on are all quite small, less than 100 MB, and so far performance hasn't been an issue.

MD5s: of course! I'll try pulling MD5s of the chunks in PHP and MySQL and report back. Thanks for the idea!

Jonathan

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.