Showing entries 11 to 17
« Précédent 10 Nouvelles entrées
Displaying posts with tag: database (reset)
Les requêtes paginées

C’est une question qui revient ad nauseam sur IRC et dans les forums de discussions : comment paginer les résultats d’une requête de manière efficace?

Pour m’éviter de répéter sans cesse les mêmes explications, j’ai finalement trouvé un texte clair qui explique comment effectuer des requêtes paginées de façon performante et intelligente.

Bien que l’article traite de MySQL, les mêmes principes de base s’appliquent aux autres SGBD.

Group by de 4 manières

Différentes subtilités du GROUP BY en MySQL expliquées pour chacune des 4 versions.  Variations sur un même thème expliquées ici!

MySQL : quelques lectures

Vous cherchez des solutions à des problèmes 1000 fois rencontrés?  Il y a de grandes chances que vous trouviez ce qu’il vous faut ici!

Un excellent blogue consacré à MySQL sur lequel je suis tombé par hasard, lefred.be.

Un article portant sur l’erreur 1215 (« Cannot add foreign key constraint« ).

Les InnoDB Page merge & split expliqués en détail dans ce billet.

[Lire plus]
The order of indexes

If you thought all you had to do was to declare a few indexes here and there and MySQL would magically be fast, you’ll be surprised reading this excellent article.


Classé dans:bases de données, database, MySQL, programming Tagged: index, MySQL, …

[Lire plus]
Freewill in progress (2)

(Click to enlarge)

What’s up?

As you can see, Freewill now supports 17 different selection policies.  At this point, all of them are coded but only half of them have been tested.

The 11 available termination policies are coded, half of them tested.

So far, only 2 mutation policies are available.  Both of them are coded and tested. I will probably need a few extras for TSP type of problems as well as numerically parametrized problems (e.g. De Jong functions with a domain for each variable).  I’ll probably add 3-4 other ones specific to the problem that started all this adventure!

Only one immigration policy (no immigration!) is available and it will stay that way …

[Lire plus]
Count occurrences of a string using MySQL

This was originally posted in French here.

There’s no string function in MySQL (and many other databases!) to help you find the number of occurrences of a string within another string.  For example, how many times does « abc »  appear in « abcbcbabcbacbcabcababcabacb » ?

I was asked this question on IRC a long time ago. Some poor soul was trying to find a particular subsequence in a genomic string (for instance « TAT ») in the following sequence :

ATTGGTGGGCTCTACTAAGATATCAACGGGACTTCGGAGCGTGCCGCACTATTT

Obviously, you can use your favorite programming language and do this kind of search programmatically but is there a way to do it in SQL?

Luckily, the answer is yes!  The solution is simple and looks like …

[Lire plus]
What’s new?

What’s new?

After a major data loss (I haven’t given up on getting back all my data, mostly code repositories and databases!), I had to start all my pet projects from scratch. Luckily, it’s easier second time around as they say! And, lucky me, I store all my personal stuff on the web! So here’s a list of what’s coming up on this blog.

Ruzzle

Even though I had a decent working version of the genetic algorithm program to find the best ruzzle grid (original posts in French here, here and here), I wasn’t satisfied with the code.  It slowly evolved from a bunch of code …

[Lire plus]
Showing entries 11 to 17
« Précédent 10 Nouvelles entrées