Skip to main content

Posts

When To Use Indexes In MySQL

When deciding when and how to create an index in your MySQL database, it's important to consider how the data is being used. Let's say you have a database of  students . We will create it like this: CREATE TABLE `students` ( `id` int ( 11 ) NOT NULL AUTO_INCREMENT , `first_name` varchar ( 255 ) DEFAULT NULL , `last_name` varchar ( 255 ) DEFAULT NULL , `class` varchar ( 255 ) DEFAULT NULL , PRIMARY KEY ( `id` ) ) ENGINE = InnoDB Indexes are best used on columns that are frequently used in where clauses, and in any kind of sorting, such as "order by". You should also pay attention to whether or not this information will change frequently, because it will slow down your updates and inserts. Since you wont frequently be adding students, you don't have to worry about the inserts Let's say that you will be looking up the students with a web interface and the end user will be typing in the students name to find them, since r...

Download a specific folder from gitHub

Git doesn't support this, but GitHub supports Subversion clients via the HTTPS protocol.GitHub uses a Subversion bridge to communicate svn commands to GitHub. GitHub repositories can be accessed from both Git and Subversion (SVN) clients. This article covers using subversion to explain how to download a specific folder. copy the URL of the GitHub repository to your clipboard https : //github.com/<github username>/<github repo> Modify the URL for subversion. I want to download the folder at /src, so I will append trunk/src. https : //github.com/<github username>/<github repo>/trunk/src now go to the command line and use svn checkout to download the folder svn checkout https : //github.com/<github username>/<github repo>/trunk/src Reference Support for Subversion clients How do I download a specific folder from gitHub