« first day (1968 days earlier)      last day (690 days later) » 

1:57 AM
@Nasir In MySQL, most views will be slow to the point of being unusable unless they are merge views.
 
 
3 hours later…
5:14 AM
Hello I need 1 help to writing query is anybody who can help ?
 
 
7 hours later…
12:09 PM
@webdeveloper still around?
Also, does anyone know if it's possible to update a file stored in the filesystem by running a procedure?
 
12:34 PM
@captainjamie yes
 
12:50 PM
@webdeveloper and do you still need help?
I can't promise anything, but I might be able to help with something simple.
 
1:48 PM
@webdeveloper Yup! Like the topic says, Ask your question, and then hang around a while to see if an expert looks back at their screen and answers it!
@captainjamie Probably not in the way you're thinking.
If you can't make the CSV storage engine or SELECT INTO OUTFILE work for you, you're probably out of luck as far as just using the database goes
 
@TehShrike I've actually decided to just store the file data as an nvarchar(max) and be done with it. They're not that big tbh.
 
oh! If you want to store arbitrarily-sized data you should use TEXT or BLOB.
what database engine are you using?
 
@TehShrike Um, so just replace nvarchar(max) with text? Or would blob be better (it's only text)
 
@captainjamie nah, TEXT is what you want dev.mysql.com/doc/refman/5.7/en/blob.html
it's very much like VARCHAR, except that it has a higher max limit if you use MEDIUMTEXT/LONGTEXT, and MySQL can store it more efficiently (in its own physical table on the side, instead of fitting it in with the physical row on disk)
 
Oh cool. Thanks for the help :) I'd not heard of text or blob before.
 
2:02 PM
@captainjamie you're welcome!
 
I take it entity framework won't need any changes?
Eh, I'll just find out now
 
Jay
why can't I do a search on a query like this: CONCAT(first_name, " ", last_name) AS customer_name
It will not like me use the customer_name in the where clause
 
Does it work when you use +?
 
2:50 PM
@Jay Yup, in the WHERE clause you have to refer to the values in the tables, you can't refer to values in the result set (built in your SELECT)
You would have to write it WHERE CONCAT(first_name, " ", last_name) = ?
but you should know that that query is super-inefficient and won't use any indexes.
You could put that limit in your HAVING clause - the HAVING is where you can add limits based on your result set. HAVING customer_name = ? would work
but to make your query efficient, you need to filter the result set down as much as possible by using indexed columns in your WHERE clause.
@captainjamie Any ORM should be able to work with TEXT types just fine.
 
@TehShrike And indeed it does. No modification was needed. I'm so impressed.
 
w00t
 

« first day (1968 days earlier)      last day (690 days later) »