Clyatt: Http://sqlfiddle.com/#!9/edf27a/3 vs http://pastie.org/10416530 even
Biddinger: Salle: because you brutaly force mysql indexing things and eventually take too long if we are talking millions of rows?
Clyatt: Naftilos76: Because this is not the right thing to do in a database
Clyatt: Naftilos76: With properly normalized database nobody would ever need such kind of search
Kruyt: Salle: do you know if phpMyAdmin does that kind of stuff?
Clyatt: Naftilos76: phpmyadmin does various crazy stuff and that’s big part of the reason we don’t support it here in #mysql
Clyatt: Naftilos76: I tried it once back in 1990s and hated it so much for what it was doing so I never touched it again
Clyatt: Naftilos76: Or maybe early 2000s. Not sure
Clyatt: Naftilos76: If you are trying to build such kind of application you should start with clear understanding for which type of users you are writing it. If DBAs and developers then it must be as transparent as possible and that rules out any casting. If end users then you have much bigger problem. The real database structure should be never exposed to the end user
Uffelman: Salle: i have mixed feelings between those who orthologicaly wish to implement things in mysql and those who just want things done. I had the illussion that phpMyAdmin is a nice piece of development code but then again you have just told me that it is crap. I am really confused which way to go :
Vidrio: Naftilos76, it only has one feature that is slightly usable ERD
Kassebaum: Vidrio, are you referring to phpMyAdmin?
Vidrio: Naftilos76, if you think you need to search for substrings on a regular basis then you have made a design mistake somewhere
Randlett: Vidrio, No i do not think that i have to. I am just trying to make things easy for the enduser. So, you would probably advise me to select the col that i want to search for a substring? Would that be wiser?
Clyatt: Vidrio: I would go one step further and say that end users of a database should never have GUI-like access to the database. These are strctly for DBA and development purposes and then what you say is logical consequence. At least it should be
Clyatt: Naftilos76: See above
Jennings: My mistake, i said endusers but meant developers/admins
Clyatt: Naftilos76: If your users are developers and admins then they will not need such kind of search either. With decent database design that is
Clyatt: Naftilos76: Also both developers and admins must be familiar with SQL so they don’t really need such kind of tool
Vidrio: Sub strings where col like ‘%fred%’ cannot use an index
Ranaudo: Salle: my thinking targets mostly an objective where need for using the terminal would almost be eliminated
Vidrio: Terminal is where you get the power of SQL
Vidrio: Stop making the users job hard
Clyatt: Naftilos76: Back in 1980s when I was interested of using GUIs with databases it was a norm to always provide “Show me the real SQL” functionality so that the user can see what exactly the server recieves as result of clicking buttons, checkboxes and such
Drye: Salle: things change so rapidly
Clyatt: Naftilos76: You are wrong
Clyatt: Naftilos76: SQL changed very little in last 30 years
Vidrio: The front end bling for your phone changes rapidly to make you upgrade and spend money, database technology matured a long time ago
Megraw: Salle: i am not referring to SQL, i am referring to people getting involved with managing databases. If they all needed to do everything from the terminal we would be having half the internet we have in terms of number of websites. People just want to get their job done. They don’t care what the sql query looks like and i am saying this mostly having in mind people that bye a reseler plan from a host and starts selling joomla websites. He barely know
Helmich: What a database looks like!
Vidrio: What you really need to learn is how to write good dynamic sql that can use indexes
Majors: Vidrio, i am trying to use PKs as much as i can