Seenthis Seenthis
•
s’inscrire
 
Identifiants personnels
  • [mot de passe oublié ?]

 
#m #my #mysql

#mysql

Thèmes rattachés à ce thème :

  • #mysql-bin
  • #mysqldump 2
    • #mysqldumpslow
    • #mysqldump_alternative
  • #mysql/mariadb
  • #mysql_workbench
  • #mysql_secure_installation
  • #mysql_utf8_encoding_clevermarks
1265176101126…201
  • @b_b
    b_b @b_b Public domain 6/01/2026

    w3spi5/bigdump: An evolution of PHP script written by Alexey Ozerov in 2013
    ▻https://github.com/w3spi5/bigdump

    https://raw.githubusercontent.com/w3spi5/bigdump/refs/heads/main/assets/img/logo.png

    BigDump is a #PHP tool for importing large #MySQL #dumps on web servers with strict execution time limits. Originally created by Alexey Ozerov in 2003, this major version 2 is a complete refactoring using object-oriented MVC architecture.

    https://raw.githubusercontent.com/w3spi5/bigdump/refs/heads/main/assets/docs/demov2.2.png
    b_b @b_b Public domain
    Écrire un commentaire
  • @aurelieng
    aurelieng @aurelieng via RSS CC BY 17/12/2025

    Maxteabag/sqlit: A user friendly #TUI for SQL databases. Written in python. Supports SQL server, #mysql, PostreSQL and #sqlite, #turso and more.
    ▻https://github.com/Maxteabag/sqlit

    — Permalink

    #sqlit #cli #sqlserver #mariadb #postgresql

    aurelieng @aurelieng via RSS CC BY
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 31/10/2024
    1
    @spip
    1

    Erreur MariaDB à la restauration d’un dump : / !999999 – enable the sandbox mode /
    ▻https://www.scandevelopers.com/2024/06/21/comprendre-lerreur-mariadb-999999-enable-the-sandbox-mode.html

    A la restauration d’un dump d’une base MariaDB réalisé avec la commande mysqldump ou mariadb-dump d’une version récente de MariaDB (10.11 par ex) on se retrouve avec comme première ligne du fichier sql :

    /*M!999999\- enable the sandbox mode */

    ce qui fait planter la restauration du dump obtenu sur une version inférieure avec un message du genre :
    ERROR at line 1: Unknown command '\-'.

    Le problème se pose typiquement lors du transfert d’un dump d’un serveur à un autre, serveurs n’ayant pas la même version de MariaDB.

    3 solutions :
    – supprimer « à la main » la ligne fautive avant de faire la restauration
    – supprimer la ligne directement lors de la génération en faisant passer le résultat de la commande mysqldump par un pipe :

    mysqldump -u toto -p --opt ma_bdd |tail +2 > ma_bdd.sql

    – lancer la restauration avec l’option --force qui permet de passer outre l’erreur générée par la ligne fautive :
    mysql -u toto -p -D ma_bdd < ma_bdd.sql --force

    (c’est la solution choisie pour spip-cli avec l’ajout d’une option --force à la commande spip synchro:bdd qui permet de lancer l’intégration du dump avec l’option idem (cf ▻https://git.spip.net/spip-contrib-outils/spip-cli/-/commit/79a1a81063984d6fc8548389bfa4def131a5d9a4)

    #MariaDB #mysqldump #mariadb-dump #enable_the_sandbox_mode #spip-cli

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 1/10/2024

    Known Issue : MariaDB Check and Repair | Info : : LinuxServer.io
    ▻https://info.linuxserver.io/issues/2023-05-29-mariadb

    Utiliser mariadb-check pour réparer une BDD crashée

    Voir aussi : ▻https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting

    #mariaDB #mySQL #serveur #Laragon #réparer

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @klaus
    klaus++ @klaus 25/11/2023
    2
    @spip
    @simplicissimus
    2

    Test de recherche d’idéogrammes chinois dans #seenthis :
    recherche : Qingdao - O.K. ( /recherche ?recherche=Qingdao )
    recherche : #Qingdao - O.K. ( /recherche ?recherche=%23Qingdao )
    filtrer : #Qingdao .O.K ( /tag/qingdao )

    recherche : 青岛 - échec ( /recherche ?recherche=青岛 )
    recherche : #青岛 O.K. ( /recherche ?recherche=%23青岛)
    filtrer : #青岛 O.K. ( /tag/青岛 )

    Les hashtags sont des mots clé alors on cherche au fait pour titre_mot, pas vrai ? Pourquoi la recherche sur le texte par contre échoue-t-elle ?
    Je suppose que c’est un problème de bdd, charset UTF-8 mais pas de jeu de caractères étendus.
    J’essaie de pour comprendre ces résultats afin de rendre possible la recherche pour des expressions en chinois dans d’autres sites #SPIP.

    Des idées ? Merci !

    klaus++ @klaus
    • @b_b
      b_b @b_b Public domain 25/11/2023

      On a déjà des problèmes avec certains caractères comme les emojis si je me souviens bien cf ►https://github.com/seenthis/seenthis_squelettes/issues/96

      Pourquoi la recherche sur le texte par contre échoue-t-elle ?

      Peut-être que ça pouiche côté sphinx ? Ou peut-être côté SPIP, mais avant de chercher dans SPIP il faudrait déjà que seenthis utilise une version à jour et maintenue, ce qui n’est plus le cas depuis quelques mois :\ ►https://github.com/seenthis/seenthis_squelettes/issues/292 (comme je le disais il y a trois mois)

      b_b @b_b Public domain
    • @klaus
      klaus++ @klaus 26/11/2023

      Je me souviens que la doc de Nextcloud impose l’utilisation de UTF8MB4 si on veut accepter les emojis.

      Je viens de poser la question de « UTF8MB4 » à mon moteur de recherche péféré.

      Résultats

      encoding - What is the difference between utf8mb4 and utf8 charsets in MySQL ? - Stack Overflow
      ▻https://stackoverflow.com/questions/30074492/what-is-the-difference-between-utf8mb4-and-utf8-charsets-in-mysql

      Good read to understand difference: ►https://www.eversql.com/mysql-utf8-vs-utf8mb4-whats-the-difference-between-utf8-and-utf8mb4
      shiwanginio
      Mar 13, 2021 at 18:47

      utf-8 can store only 1, 2 or 3 bytes characters, while utf8mb4 can store 4 bytes characters as well. utf-8 is a subset of characters given by utf8mb4. full stop.

      MySQL : : MySQL 8.0 Reference Manual : : 10.9.1 The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)
      ▻https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-utf8mb4.html

      MySQL : : MySQL 8.0 Reference Manual : : 10.10.1 Unicode Character Sets
      ▻https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html

      #MySQL

      klaus++ @klaus
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 7/09/2023
    5
    @rastapopoulos
    @monolecte
    @simplicissimus
    @7h36
    @olaf
    5

    GitHub - noborus/trdsql : CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
    ▻https://github.com/noborus/trdsql

    Un outil en CLI (WIndows/Linux/MacOS) qui permet d’exécuter des requêtes SQL avec la syntaxe MySQL sur tout un tas de sources : CSV, JSON, MD,... mais aussi MySQL
    – propose différents formats de sortie
    – permet d’utiliser plusieurs fichiers en entrée

    #trdsql #MySQL #csv #json

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 6/04/2023

    The complete mysqldump guide (with examples)
    ▻https://simplebackups.com/blog/the-complete-mysqldump-guide-with-examples

    Détail de l’utilisation de plusieurs options utiles de mysqldump : --quick, --single-transaction

    #mysqldump #sauvegardes

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 22/03/2023

    13 Tips for Tuning and Optimizing MySQL and MariaDB - VITUX
    ▻https://vitux.com/tune-and-optimize-mysql-mariadb

    doc minimum pour les paramètres de configuration de MySQL/MariaDB

    #mariaDB #mySQL #configuration #Debian

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @b_b
    b_b @b_b Public domain 5/01/2023

    rename - How to add #prefix of all tables in #mysql - Stack Overflow
    ▻https://stackoverflow.com/questions/7970798/how-to-add-prefix-of-all-tables-in-mysql

    Run all queries that you get from running this query:

    SELECT Concat('ALTER TABLE `', TABLE_NAME, '` RENAME TO `dr_', TABLE_NAME, '`;') FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '<name of your db>';

    b_b @b_b Public domain
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 5/12/2022

    How to fix the mysqldump process privilege error - Another Cup of Coffee
    ▻https://anothercoffee.net/how-to-fix-the-mysqldump-access-denied-process-privilege-error

    2 méthodes pour contourner le problème de droits avec la commande mysqldump sur les BDD en MySQL 8 lorsqu’on a un utilisateur aux droits limités au strict minimum :

    mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

    – ajout du PRIVILEGE PROCESS
    – utilisation de l’option --no-tablespaces

    la note de version de MySQL sur cette modification de compatibilité : ▻https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-21.html#mysqld-8-0-21-security

    #PROCESS #tablespaces #MySQL

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 1/09/2022

    Utilisation de EXPLAIN de MySQL pour optimiser des requêtes SQL
    ▻https://www.mon-code.net/article/157/utilisation-de-la-fonction-explain-de-mysql-pour-optimiser-des-requetes-sq

    un exemple d’utilisation de EXPLAIN et d’optimisation en jouant sur les index des tables

    #EXPLAIN #MySQL #optimisation

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 10/08/2022
    2
    @spip
    @tofulm
    2

    {par_ordre_liste...} - SPIP
    ▻https://www.spip.net/fr_article6646.html#par_ordre_liste

    le critère de tri SPIP par_ordre_liste a un gros défaut : si on l’applique sur un ensemble d’éléments qui ne sont pas tous dans la #LISTE passée en 2e paramètre, il affiche d’abord les éléments hors de la #LISTE puis ceux qui sont dedans.
    Exemple si on a 16 sites syndiqués dans la BDD :

    <BOUCLE_t(SYNDIC){par_ordre_liste id_syndic, #LISTE{14,16,13}}{id_syndic > 10}>

    retourne les sites dans l’ordre suivant : 11, 12, 15, 14, 16, 13
    La requête SQL passée est :
    SELECT * FROM spip_syndic AS syndic 
    WHERE syndic.id_rubrique > 10
    ORDER BY FIELD (syndic.id_syndic, 14,16,13);

    Pour obtenir le résultat « naturellement attendu » (i.e. d’abord ceux de la liste puis les autres) il faut utiliser la requête SQL suivante :

    SELECT * FROM spip_syndic AS syndic 
    WHERE syndic.id_rubrique > 10
    ORDER BY IF (FIELD(syndic.id_syndic, 14,16,13)=0,1,0), FIELD(syndic.id_syndic,14,16,13);

    D’après ▻https://dba.stackexchange.com/questions/109120/how-does-order-by-field-in-mysql-work-internally pour la très astucieuse utilisation du IF (FIELD ... en premier critère de la requète

    #ORDER_BY_FIELD #ORDER #SPIP #par_ordre_liste #MySQL

    cy_altern @cy_altern CC BY-SA
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 10/08/2022

      bééé ticket donc, plutôt que seenthis non ? :)

      RastaPopoulos @rastapopoulos CC BY-NC
    • @cy_altern
      cy_altern @cy_altern CC BY-SA 10/08/2022

      oui effectivement (au départ c’était pour garder simplement trace du IF(FIELD(...)
      ▻https://git.spip.net/spip/spip/issues/5273 donc !

      cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @b_b
    b_b @b_b Public domain 24/06/2022
    4
    @rastapopoulos
    @cy_altern
    @tofulm
    @fil
    4

    dolthub/dolt: Dolt – It’s Git for Data
    ▻https://github.com/dolthub/dolt

    Dolt is a #SQL database that you can #fork, clone, branch, merge, push and pull just like a git repository. Connect to Dolt just like any MySQL database to run queries or update the data using SQL commands. Use the command line interface to import CSV files, commit your changes, push them to a remote, or merge your teammate’s changes.

    All the commands you know for #Git work exactly the same for Dolt. Git versions files, Dolt versions tables. It’s like Git and MySQL had a baby.

    b_b @b_b Public domain
    • @cy_altern
      cy_altern @cy_altern CC BY-SA 24/06/2022

      Semble proposer à peu près tout le nécessaire pour remplacer MySQL/MariaDB :
      – un serveur
      – un client
      – une interface de gestion à la phpmyadmin
      ...mais avec la puissance de Git pour gérer des modifications collaboratives (fok, merge, checkout...)

      #dolt #mysql #mariadb #web_dev #git_pour_bdd

      cy_altern @cy_altern CC BY-SA
    • @rastapopoulos
      RastaPopoulos @rastapopoulos CC BY-NC 24/06/2022

      Après pour remplacer, faudra pas juste regarder les outils : faut voir comment ça tient la charge, en terme d’accès concurrents, de quantité de contenus, un site très visité, ou inversement beaucoup de modifs en même temps (beaucoup de rédacteurs/commentateurs, etc, toutes choses qui écrivent dans la base)

      RastaPopoulos @rastapopoulos CC BY-NC
    • @fil
      Fil @fil 25/06/2022

      installé sur macos avec brew, ça marche nickel

      Fil @fil
    Écrire un commentaire
  • @b_b
    b_b @b_b Public domain 3/11/2019
    1
    @tofulm
    1

    maxbube/mydumper: Official #mydumper project
    ▻https://github.com/maxbube/mydumper

    What is mydumper? Why?

    – Parallelism (hence, speed) and performance (avoids expensive character set conversion routines, efficient code overall)
    – Easier to manage output (separate files for tables, dump metadata, etc, easy to view/parse data)
    – Consistency - maintains snapshot across all threads, provides accurate master and slave log positions, etc
    – Manageability - supports PCRE for specifying database and tables inclusions and exclusions

    When it comes to backing up and restoring MySQL database, most people usually use the very popular mysqldump. Whilst, mysqldump can be very easy to use for a smaller database, it doesn’t work well with larger databases. It’s very slow for huge databases and very error prone when used for very big MySQL databases.

    ▻https://dotlayer.com/extremely-fast-mysql-backup-restore-using-mydumpermyloader

    Semble être utilisé par wikmedia cf :

    Its speed and parallelism makes it perfect to save time and load data a lot faster.
    It is easier to recover single tables or rows.
    It compress nicely

    ▻https://wikitech.wikimedia.org/wiki/MariaDB#Dumping_tables_with_mydumper

    #mysqldump_alternative

    b_b @b_b Public domain
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 20/09/2019
    2
    @spip
    @tofulm
    2

    sort MySQL-ORDER BY valeurs dans IN() - Résolu
    ▻https://code.i-harness.com/fr/q/ea0a3#answer3

    utiliser une liste pour ordonner les résultats d’une requete (typiquement faire un
    id_truc IN (1, 3, 5, 8)
    et avoir les résultats triés selon le même ordre
    ce qui se fait avec :
    SELECT * FROM spip_truc WHERE id_truc IN (1, 3, 5, 8) ORDER BY FIELD (id_truc, 1, 3, 5, 8)
    Ce qui donne en requête SPIP :
    <BOUCLE_t(TRUCS){id_truc IN  1, 3, 5, 8}{par FIELD (id_truc, 1, 3, 5, 8)}>
    ça fonctionne très bien comme ça...
    ...sauf qu’avec la valeur de la liste en dynamique (#SET/ #GET) ça ne veut rien savoir (même avec tous les bricolages possibles...) Dommage ! :-(

    #mysql #FIELD #trier #SPIP

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 17/09/2019

    John’s Observation Loft : Adding or removing individual SQL modes in MySQL’s sql_mode variable
    ▻http://johnemb.blogspot.com/2014/09/adding-or-removing-individual-sql-modes.html

    La syntaxe des requêtes MySQL pour ajouter/modifier/supprimer à la volée des valeurs aux sql_mode (défini dans la configuration du serveur)

    #sql_mode #MySQL #configuration

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @b_b
    b_b @b_b Public domain 16/04/2019
    1
    @tofulm
    1

    #MariaDB #Memory Allocation - MariaDB Knowledge Base
    ▻https://mariadb.com/kb/en/library/mariadb-memory-allocation

    Allocating RAM for MySQL - The short answer

    If using just MyISAM, set key_buffer_size to 20% of available RAM. (Plus innodb_buffer_pool_size=0)

    If using just InnoDB, set innodb_buffer_pool_size to 70% of available RAM. (Plus key_buffer_size = 10M, small, but not zero.)

    Rule of thumb for tuning mysql:

    – Start with released copy of my.cnf / my.ini.
    – Change key_buffer_size and innodb_buffer_pool_size according to engine usage and RAM.
    – Slow queries can usually be ’fixed’ via indexes, schema changes, or SELECT changes, not by tuning.
    – Don’t get carried away with the query cache until you understand what it can and cannot do.
    – Don’t change anything else unless you run into trouble (eg, max connections).
    – Be sure the changes are under the [mysqld] section, not some other section.

    The 20%/70% assumes you have at least 4GB of RAM. If you have a tiny antique, or a tiny VM, then those percentages are too high.

    Now for the gory details. (NDB Cluster is not discussed here.)

    #mysql

    b_b @b_b Public domain
    Écrire un commentaire
  • @b_b
    b_b @b_b Public domain 14/04/2019
    1
    @tofulm
    1

    How to change a MySQL database’s table prefix | Rich Jenks
    ▻https://richjenks.com/change-mysql-database-table-prefix

    The output will be a series of SQL queries that will rename the tables for you

    ❝SET @database   = "database_name";
    SET @old_prefix = "old_prefix_";
    SET @new_prefix = "new_prefix_";
     
    SELECT
        concat(
            "RENAME TABLE ",
            TABLE_NAME,
            " TO ",
            replace(TABLE_NAME, @old_prefix, @new_prefix),
            ';'
        ) AS "SQL"
    FROM information_schema.TABLES WHERE TABLE_SCHEMA = @database;❞

    #mysql #prefixe

    b_b @b_b Public domain
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 28/02/2019

    Using #docker To Run #mysql Server In Your Development Environment
    ▻https://hackernoon.com/using-docker-to-run-mysql-server-in-your-development-environment-e32d523

    https://cdn-images-1.medium.com/max/900/0*3nDnCayBCd9pA-8r.jpg

    Today I’m going to show you how can you can use Docker to run MySQL Server in your development environment. Using Docker to run MySQL is much easier than manually installing it and for when you have multiple instances of MySQL running at the same time. I’m assuming that you already have Docker Community Edtion install on your machine. If you do not have Docker installed follow the instruction here for your operating system.Install MySQL Using DockerIf you search online for how to install MySQL using Docker, you will see many different examples on how to do this. I’m going to show how to do it so that you can connect to the database from your IDE and from the applications you are developing.Type this command at the terminal:$ docker run -p 3306:3306 —name hb-mysql-example -e (...)

    #devops #java #programming

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 27/02/2019

    Impact on Insert Performance — Primary Keys in #mysql
    ▻https://hackernoon.com/impact-on-insert-performance-primary-keys-in-mysql-590ecf8ba67?source=rs

    https://cdn-images-1.medium.com/max/1024/1*WTsG9lqGrPzqPbhWxlf-9Q.png

    Impact on Insert Performance — Primary Keys in MySQLThe importance of Primary Keys in MySQLNote: I have used MySQL and it’s storage engine #innodb interchangeably.A couple of days ago, someone at work asked me whether inserts are faster in a table when there’s a primary key present in the table. My immediate answer was that they were faster. I had some idea about this from experience and previous reading but didn’t remember the reason why it was so.For a business user unaware about InnoDB internals or InnoDB’s existence, it might seem perfectly intuitive to assume that inserts will be faster without a primary key because a primary key is an additional constraint on the table, i.e., MySQL has to check for uniqueness, nullability. When it comes to InnoDB, that is not the case. Also, a table (...)

    #database #performance-testing #database-administration

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 7/02/2019

    Adding #elasticsearch To Legacy Application Using #logstash
    ▻https://hackernoon.com/adding-elasticsearch-to-legacy-application-using-logstash-98c19ac2f0fb?s

    https://cdn-images-1.medium.com/max/1024/1*nNR_e2gAr8kwLKW2ZoZOhA.png

    ElasticSearch has created a boom in the market with its ability to store, scaling, performing full-text search and analytics on the humongous amount of data in near real time. ElasticSearch is open source search and analytics engine generally used in applications which have complex search features.In this tutorial, we are going to consider a scenario where we wish to add ElasticSearch to our legacy application as a Secondary Data Source. Say suppose we have a legacy application which uses #mysql database and now we have a requirement where we need to have a heavy search and we have decided to move to ElasticSearch. My idea here would still stick to Relational Databases as a Primary Data Store and use ElasticSearch as a Secondary Data Store for the requirements where we need to have the (...)

    #add-elasticsearch #advanced-search

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 23/12/2018

    #sharding writes with #mysql and increment offsets
    ▻https://hackernoon.com/sharding-writes-with-mysql-and-increment-offsets-48df32379563?source=rss

    https://cdn-images-1.medium.com/max/600/0*UvsNvfPreQlGvO9Z.png

    Sharding Writes with MySQL and Increment OffsetsTL;DRwe shard writes and avoid conflicts using an increment offset on PKseach #data center contains local write serverswe use multi-source replication on read servers so they contain all the data from all data centers, partitioned by monthAt the beginning, things were simpleWe were using MySQL: one master for writing, and a few slaves for reading. Besides replication lag (more on that later), it worked fine. And then you scale. And then it fails! The master is a SPOF — “Single Point Of Failure”.Whether the process failed, the VM crashed, or we had to do maintenance on the server, having only one “master” to write to meant that the service was down for minutes. And this was not acceptable.The first thing we implemented was sharding based on the (...)

    #data-replication #database

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 17/12/2018

    #activerecord on #mysql— Iterating over large tables with conditions
    ▻https://hackernoon.com/activerecord-on-mysql-iterating-over-large-tables-with-conditions-453bd8

    https://cdn-images-1.medium.com/max/738/1*ZVxd0g85DK_AiHSym6CtNA.png

    In this article, I’m going to demonstrate performance differences between two ways of iterating over the records in a MySQL database table with millions of records. In a high volume analytics system, tables with millions of records are quite common and iterating over the full table or a subset of these tables becomes often necessary — whether it’s to perform computations, run a migration, or create parallelized background jobs on the records. At AirPR, we have many database tables with 100s of millions of records, and it becomes important to write efficient code for iterations because there is often an order of magnitude difference between a good and not-so-good approach.Find Each MethodThe standard approach provided natively by ActiveRecord is the find_eachmethod.For the purposes of this (...)

    #rails #programming #activerecord-on-mysql

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @cy_altern
    cy_altern @cy_altern CC BY-SA 23/11/2018
    2
    @recriweb
    @tofulm
    2

    MySQL — Wikilivres
    ▻https://fr.wikibooks.org/wiki/MySQL

    Documentation de MySQL en français (puisque Oracle a supprimée le français de la doc officielle...)

    #mysql #documentation

    cy_altern @cy_altern CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 19/06/2018

    Elephant in the Room: #database #backup
    ▻https://hackernoon.com/elephant-in-the-room-database-backup-574da50e6d88?source=rss----3a8144ea

    https://cdn-images-1.medium.com/max/1024/1*Tm3culOnUMproMU2I6j58w.jpeg

    Photo by Alexandre ChambonWe’ve seen it many times. Yet it sill occurs on a regular basis, as if there’s no permanent cure for this chronic problem.About 9 years ago, Sidekick, a popular T-Mobile smartphone at the time, lost all of user data in the cloud, leaving 800,000 users without access to their own personal data such as email, notes, contacts, calendars and photos.Later on, Microsoft decided to discontinue the cloud service and eventually, sales of the device.As a result, a massive business and its ecosystem ceased to exist. It was the biggest disaster in cloud computing history.GitLab also suffered from broken recovery procedures when an engineer had accidentally deleted a directory on the wrong server, by running rm -rf /important-data on their primary database.Side note: Kudos to (...)

    #mysql #cloud-computing #database-backup

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
1265176101126…201

Thèmes liés

  • #mariadb
  • #formateur_mysql
  • #php
  • #formateur_mariadb
  • #apache
  • #postgresql
  • #linux
  • #lamp
  • #spip
  • #base_de_données
  • #sql
  • #formateur_lamp
  • #documentation
  • #oracle_database
  • #formateur_postgresql
  • #sql_server
  • #sqlite
  • #formation_mysql
  • #formateur_apache
  • #serveur
  • #database
  • #formateur_sql
  • #formateur_oracle_database
  • #formateur_sql_server
  • #sécurité_informatique
  • #formateur_php
  • #formation_apache
  • #formation_lamp
  • #logiciel_libre
  • #csv
  • #configuration
  • #optimisation
  • #programming
  • #innodb
  • #macos
  • #formation_mariadb
  • #formateur_oracle
  • #formations
  • #formateur_linux
  • #formateur_wordpress

Sites liés

  • ►http://4.bp.blogspot.com/-N3LJsOhNMPY/T9_YsGoa4-I/AAAAAAAAAB8/QofHT8Fytj0/s200/foto.jpg
  • ►http://m1.paperblog.com/i/245/2458399/concatenar-cadenas-saltos-linea-php-L-7fmfzY.png
  • ►http://peek-a-booo.fr/wp-content/uploads/2013/07/IMG_3845.jpg
  • ►https://mathiasbynens.be/notes/mysql-utf8mb4
  • ►https://blog.mariadb.org/mysql-man-pages-silently-relicensed-away-from-gpl
  • ►https://raw.githubusercontent.com/w3spi5/bigdump/refs/heads/main/assets/img/logo.png
  • ►https://github.com/w3spi5/bigdump
  • ►https://raw.githubusercontent.com/w3spi5/bigdump/refs/heads/main/assets/docs/demov2.2.png
  • ►https://github.com/Maxteabag/sqlit
  • ►https://www.scandevelopers.com/2024/06/21/comprendre-lerreur-mariadb-999999-enable-the-sandbox-mode.html
  • ►https://git.spip.net/spip-contrib-outils/spip-cli/-/commit/79a1a81063984d6fc8548389bfa4def131a5d9a4
  • ►https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting
  • ►https://info.linuxserver.io/issues/2023-05-29-mariadb
  • ►https://github.com/noborus/trdsql
  • ►https://simplebackups.com/blog/the-complete-mysqldump-guide-with-examples
  • ►https://vitux.com/tune-and-optimize-mysql-mariadb
  • ►https://stackoverflow.com/questions/7970798/how-to-add-prefix-of-all-tables-in-mysql
  • ►https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-21.html#mysqld-8-0-21-security
  • ►https://anothercoffee.net/how-to-fix-the-mysqldump-access-denied-process-privilege-error
  • ►https://www.mon-code.net/article/157/utilisation-de-la-fonction-explain-de-mysql-pour-optimiser-des-requetes-sq
  • ►https://www.spip.net/fr_article6646.html#par_ordre_liste
  • ►https://dba.stackexchange.com/questions/109120/how-does-order-by-field-in-mysql-work-internally
  • ►https://github.com/dolthub/dolt
  • ►https://wikitech.wikimedia.org/wiki/MariaDB#Dumping_tables_with_mydumper
  • ►https://dotlayer.com/extremely-fast-mysql-backup-restore-using-mydumpermyloader
  • ►https://github.com/maxbube/mydumper
  • ►https://code.i-harness.com/fr/q/ea0a3#answer3
  • ►http://johnemb.blogspot.com/2014/09/adding-or-removing-individual-sql-modes.html
  • ►https://mariadb.com/kb/en/library/mariadb-memory-allocation
  • ►https://richjenks.com/change-mysql-database-table-prefix
  • ►https://cdn-images-1.medium.com/max/900/0*3nDnCayBCd9pA-8r.jpg
  • ►https://hackernoon.com/using-docker-to-run-mysql-server-in-your-development-environment-e32d523
  • ►https://cdn-images-1.medium.com/max/1024/1*WTsG9lqGrPzqPbhWxlf-9Q.png
  • ►https://hackernoon.com/impact-on-insert-performance-primary-keys-in-mysql-590ecf8ba67?source=rs
  • ►https://cdn-images-1.medium.com/max/1024/1*nNR_e2gAr8kwLKW2ZoZOhA.png
  • ►https://hackernoon.com/adding-elasticsearch-to-legacy-application-using-logstash-98c19ac2f0fb?s
  • ►https://cdn-images-1.medium.com/max/600/0*UvsNvfPreQlGvO9Z.png
  • ►https://hackernoon.com/sharding-writes-with-mysql-and-increment-offsets-48df32379563?source=rss
  • ►https://cdn-images-1.medium.com/max/738/1*ZVxd0g85DK_AiHSym6CtNA.png
  • ►https://hackernoon.com/activerecord-on-mysql-iterating-over-large-tables-with-conditions-453bd8