Smarter replacement checks for columns
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- sql
- Ambito
- cli, databases, performance
Direzione di ricerca
The issue names no files or tests; begin by tracing the search-replace command's column selection and SQL generation using the wp_posts example and its --skip-columns options. Done means the command can safely identify columns that do not need replacement while preserving expected replacements and improving the reported runtime.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature Request
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
I have been actively trying to increase the velocity on my own URL S&Rs. To benchmark/diagnose how I could make them faster I started watching the SQL connections on large, test DBs with about 20gb worth of database rows living in wp_posts.
What I tended to notice are queries like the following:
UPDATE `wp_posts` SET `post_status` = REPLACE(`post_status`, 'http://dontmatter.co/', 'http://dontmatter.test/')
basically S&R is trying to replace on a column we can say confidently is not going to hold something I'd like to replace. One way around this is skipping these checks is to skip on this particular column. In my benchmarks case I skipped the following:
docker-compose run --rm wpcli wp search-replace --url=http://dontmatter.co/ 'http://dontmatter.co/' 'http://dontmatter.test/' wp_posts --recurse-objects --skip-columns=post_title,post_excerpt,post_status,comment_status,post_password,post_name,to_ping,pinged,guid,post_type,post_mime_type
a command that used to take me 32 minutes to execute now takes me 7 minutes with these changes.
Describe the solution you'd like
While I could do this for every single table in WP on my own, I feel this could be easier by being smarter about what columns we could skip automatically. Like we're never going to see something we'd like to replace on columns that act as binaries or columns that are like enums such as post_type that are all typed as varchar in the db.
- Lingua principale
- Gherkin
- Stelle
- 61
- Fork
- 47
- Merge medio
- 8m
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di wp-cli/search-replace-command
-
bug command:search-replace scope:distribution state:unconfirmed
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
wp-cli/search-replace-command#231 · 5 commenti ·
-
command:search-replace contributor-day
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
wp-cli/search-replace-command#186 · 2 commenti · 11 reazioni ·
-
command:search-replace
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
wp-cli/search-replace-command#142 · 5 commenti · 2 reazioni ·
-
command:search-replace
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
wp-cli/search-replace-command#137 · 6 commenti · 4 reazioni ·
-
Progress bar Apertacommand:search-replace
wp-cli/search-replace-command#134 · 1 commento · 6 reazioni · 1 assegnatario ·
Tutte le issue di wp-cli/search-replace-command
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
milvus-io/birdwatcher#545 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
area:tools bug good first issue help wanted priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
newrelic-experimental/preflight#793 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
caddyserver/caddy#8046 ·