The next problem is that apparently mysql can't index a VARCHAR(255). You get:
> sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1709, 'Index > column size too large. The maximum column size is 767 bytes.') One solution I saw mentioned was to not index the string, but to compute a hash, store that as a separate column, and index the hash. Which feels like I'm working for the database instead of the other way around. > On Jan 25, 2023, at 3:52 PM, Daniel Zahn <dz...@wikimedia.org> wrote: > > On Wed, Jan 25, 2023 at 12:33 PM Roy Smith <r...@panix.com> wrote: >> >> Thanks. This field is intended to hold a wikipedia page title (including >> the namespace). Would 255 be long enough to hold any legal title? > > Looks like that should be the actual limit, yea. > > "A pagename cannot exceed 255 bytes in length. Be aware that non-ASCII > characters may take up to four bytes in UTF-8 encoding, so the total > number of characters that can fit into a title may be less than 255." > > found at > https://en.wikipedia.org/wiki/Wikipedia:Page_name#Technical_restrictions_and_limitations > > -- > Daniel Zahn <dz...@wikimedia.org> > Site Reliability Engineer > _______________________________________________ > Cloud mailing list -- cloud@lists.wikimedia.org > List information: > https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/ > _______________________________________________ Cloud mailing list -- cloud@lists.wikimedia.org List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/