Questions tagged [tinytext]

13 questions
11
votes
2 answers

Is there any reason to ever use TINYTEXT?

As far as I can tell, VARCHAR(255) does everything TINYTEXT can do. VARCHAR has the same storage size, it's part of the ISO standard, it allows default values other than null. I can't see any reason to ever use TINYTEXT. But it exists, so maybe…
Robert
  • 6,660
  • 5
  • 39
  • 62
8
votes
4 answers

For innodb table in MySQL, which is faster: varchar(255) or tinytext?

I am optimizing some innodb tables in MySQL, so I ran procedure analsye() to see what the recommendations were. The results recommended tinytext instead of varchar(255) for all the fields that were previously set up as varchar(255) Is there a…
Andy Swift
  • 2,179
  • 3
  • 32
  • 53
3
votes
3 answers

TINYTEXT as a PRIMARY key in MySQL?

Entries in my table are uniquely identified by word that is 5-10 characters long and I use TINYTEXT(10) for the column. However, when I try to set it as PRIMARY key I get the error that size is missing. From my limited understanding of the docs,…
Kirikan
  • 119
  • 6
3
votes
2 answers

char vs tinytext

What is the difference between char and tinytext in MySQL?
ilhan
  • 8,700
  • 35
  • 117
  • 201
2
votes
1 answer

Can we use HTML features in TinyTex (R Markdown)

everyone! I'm VERY new to Rmarkdown, so this may be a silly question. I was able to use HTML tags when kniting html file. However, I'm wondering If I could also use them when kniting a pdf file? I'm a bit used to HTML, so it would really help me if…
Larissa Cury
  • 806
  • 2
  • 11
1
vote
2 answers

PHP:: mySqli does not insert a new line with a variable

This line is working perfectly : $mysqli->query("INSERT INTO `myDatabase`.`myTable`(Date,Time,SID) VALUES (1,2,3)"); But this not : session_start(); $sessionID=session_id(); $mysqli->query("INSERT INTO `myDatabase`.`myTable`(Date,Time,SID) VALUES…
Hezi-Gangina
  • 637
  • 6
  • 20
1
vote
1 answer

Computation: better to truncate before insertion or let MySQL truncate?

Difficult question to phrase, so let me explain. As part of an RSS caching system I'm inserting a lot of rows into a DB, several times a day. One of the columns is 'snippet', for the description node in the RSS feeds. Sometimes this node is far…
Mitya
  • 33,629
  • 9
  • 60
  • 107
0
votes
0 answers

What is more efficient to use for a column in a large MySQL table -TINYTEXT or VARCHAR?

When I have a very large database MySQL table and I wish to add a small text field column that will be rarely used (used only for a small number of records), is it more efficient to use VARCHAR(255) or TINYTEXT? I am guessing that since TINYTEXT is…
Dennis
  • 7,907
  • 11
  • 65
  • 115
0
votes
2 answers

How can I import a SQL table that has ~350 columns?

I am trying to import a SQL table on a Digital Ocean LAMP stack in phpMyAdmin and I am getting this error: #1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored…
Michael Lynch
  • 2,682
  • 3
  • 31
  • 59
0
votes
1 answer

Do char / varchar / text / longtext columns in MySQL occupy full size in filesystem even for partially filled cells?

Do varchar/text/longtext columns in MySQL occupy full length size in filesystem even for incomplete cells? Referring to this blog article for example I have the following columns and i have put in a given string in it. CHAR (72) - can store upto 72…
Rakib
  • 12,376
  • 16
  • 77
  • 113
0
votes
0 answers

MySQL key length problems when adding a column

I am having problems with modifying an existing table in MySQL. When adding a new column, MySQL complains about indexing on an existing column. Here is what I am seeing: mysql> CREATE TABLE test (name TINYTEXT, KEY(name(255))); Query OK, 0 rows…
Bruce
  • 63
  • 4
0
votes
0 answers

MySQL - What is the difference between tinytext and varchar?

I've been coding php/mysql for years under the assumption that varchar was meant for when you know the length of the input string - e.g. if report numbers are always 20 characters alphanumeric. Alternatively, I always thought Tinytext should be used…
CodeMoose
  • 2,964
  • 4
  • 31
  • 56
0
votes
2 answers

MySQL UTF Text Capacity

I have column named "summary" (tinytext, utf8_turkish_ci). I know it can store 255 byte also 255 chars. But if i use unicode chars like Ç, Ö, Ü storage capacitiy naturally decreasing. If my visitor enter 250 chars long unicode text then last chars…
mTuran
  • 1,846
  • 4
  • 32
  • 58