Ike: What’s the limit of LONGBLOB?
Scavotto: And is there a way I could store it in a variable-length field like a VARCHAR, without wasting a ton of whitespace?
Patchin: X86: See http://dev.mysql.com/doc/refman/5.6/en/storage-requirements.html
Franckowiak: Blobs are variable length, same with TEXT.
Herrion: Would it be better to store the image as binary, and not encode it to base64?
Bouse: Generally i think its better not to store them in a DB. base64 encoding only adds to size and things to do on insert/retrieval so why bother.
Varieur: Tum_: that plan doesn’t look particularly good.
Varieur: Tum_: also, why are you using a subquery now?
Nannie: Varieur: I use subquery there because it takes advantage of Course table’s index. This reduces 1M rows to 20 rows.
Pappy: But the problem is that I somehow can’t force the ps_cl***_instr table to use FULL index
Varieur: All right. You seem to know better, so I’ll let you handle it.
Massoud: Varieur: but I’m confused about why I can’t force index though
Vinroe: Could you help with this?
Burling: P.s. didn’t you suggest to filter before join?
Sanburg: You don’t need a subquery to force an index usage. use them sparingly. joins rock!
Varieur: Tummykung: I never told you to use a subquery
Grosse: Varieur: ah I see. how do I filter then?
Varieur: Tummykung: with a WHERE clause.
Argyle: It’s already in the query though
Furnace: Let me put together everything and I’ll send another gist
Kirschenman: Tummykung: mysql will do a query as best as possible. it won’t rewrite your query into somtheing better.
Fila: Do not save images to the db
Raio: Take your where clause from the subquery and put it on the end. then remove the subquery to be just FROM Courses JOIN .
Lafarge: Danblack, Varieur: this is the query I’m at
Clore: It takes about 15 s still
Wilden: The index from ps_cl***_instr was not used, even though I forced using it
Calhoon: Tummykung: and if you don’t force it?
Gago: Then it doesn’t use any index
Denherder: It can’t use an index while courses is first because all of the criteria is in the other table.
Patanella: So is there anyway I can speed up this query?
Houman: The number of courses that match this query should be less than 20
Mandarino: But then it still takes 15 s to join with the ps_cl***_instr, just to find the instructors of these courses
Mellado: So I’m not so sure how to speed things upo
Bartamian: Tummykung: so if you’ve exhaused the query planning/index you need to move on to tuning.
Kinsler: I dont’ have time however.
Gaestel: No problem. thanks for the suggestion. Can you point me to where I can find out more about tuning?
Walks: Look at the status variables. see what they mean.
Laslie: Another quick question. would creating a temporary table and indexing it help?
Muralles: Can smeone pastebin a simple dbconnect so can ****yze the synax of how to add rows to my learn / test database? gna ask same in php for their source. i know a tad about mysql and php. im able to connectdb nut cannot insert entries to the selected database in php.
Benje: Could using login info as root with no p*** being the issue? is that even secure?
Manross: Above: use PDO and parameterized queries for security. http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers
Hoppe: Thanksed. heard the pdo term but havent studied it yet. just have moderate html/css and a tad of php as of now. thanks.
Newill: Fyi goal is to create an ssl with md5 security and injection protection to store cc data and such for an ecommerce site. thanks again.