Questions tagged [longtext]

129 questions
4
votes
0 answers

'Impossible WHERE noticed...' with MySQL INNER JOIN on LONGTEXT cols. Options?

I am investigating a slow running SQL query on a production mySQL database, and looking for options on improving performance. I did not design or implement this, but I do need to fix it. The intended purpose of the SQL is to check if the same…
Steve Ned
  • 71
  • 3
4
votes
1 answer

GROUP_CONCAT and Longtext

I need to combine two text fields in the MySQL Database table into One, So I have used the Following SQL script to do it. Table: tbl_newsitems Combine: Need to combine the text in the 'ni_text' with the same 'news_id' Table Layout: Code used to…
lbo
  • 41
  • 1
  • 2
4
votes
1 answer

Memory consumption of having a column LONGTEXT in MySQL database

I'm creating a log table in my MySQL database. One of the field will be only used in approximately 5% of the logs and will contains stack traces and others lengthy informations for the developers. I was considering using the LONGTEXT field but I was…
Jean-François Côté
  • 3,750
  • 10
  • 48
  • 82
4
votes
1 answer

How are longtext columns stored on the disk?

I'm working on an email support system. Each stored email contains from_email, subject, date, some flags, and the contents of the mail. Clearly, the amount of mail can be large, and our system is mainly focused on the most recent messages (for…
apartridge
  • 1,740
  • 11
  • 16
3
votes
4 answers

Removing newlines in PHP - but they still show in LONGTEXT in MySQL

Ello chaps. Ok - cleaning my string like this: $clean_string = preg_replace("/[\n\r]/"," ",trim($dirty_string)); .. Echo it out to the screen and it works - one lovely big lump of text with no newlines. INSERT it into a LONGTEXT type field in MySQL…
a_good_swan
  • 67
  • 1
  • 1
  • 10
3
votes
0 answers

Database Query Failed on inserting huge text through textarea

I am developing an application using PHP and MySql. I have used the datatype longtext to input text data using