profiling:django
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| profiling:django [2014/09/12 11:51] – creazione da completare letti | profiling:django [2015/02/16 15:28] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Una volta ottenuti i file di profilazione (ipotizzando che abbiano come estensione `.prof` ), è possibile produrre dei file file di testo da questi eseguendo: | ||
| - | |||
| - | * for i in `ls / | ||
| - | |||
| - | |||
| ====== GUIDA DI PROFILAZIONE SU DJANGO ====== | ====== GUIDA DI PROFILAZIONE SU DJANGO ====== | ||
| Line 33: | Line 28: | ||
| * `ordini.desmacerata.it`, | * `ordini.desmacerata.it`, | ||
| * `gasistafelice.befair.it`, | * `gasistafelice.befair.it`, | ||
| + | |||
| + | Una volta ottenuti i file di profilazione .prof creati dal software, è possibile produrre dei file file di testo da questi eseguendo: | ||
| + | |||
| + | * for i in `ls / | ||
| + | |||
| ==== Guardare ==== | ==== Guardare ==== | ||
| - | Si è scelta la vista `insolutes_orders`, | + | Si è scelta la vista `insolutes_orders`, |
| + | |||
| + | * in data 2014/05/15 per un tempo totale di 192.639 sec nel server ordini.desmacerata.it | ||
| + | * in data per un tempo totale di sec nel server gasistafelice.befair.it | ||
| + | |||
| + | La vista puo essere relativa a una risorsa, il GAS. | ||
| + | |||
| + | |||
| + | ==== Riprodurre ==== | ||
| + | |||
| + | === ordini.desmacerata.it === | ||
| + | |||
| + | In locale, è stato scelto di riprodurre la chiamata per il GAS gassosa: | ||
| + | |||
| + | * //GAS// http:// | ||
| + | |||
| + | === gasistafelice.befair.it === | ||
| + | |||
| + | In locale, è stato scelto di riprodurre la chiamata per il GAS gassosa: | ||
| + | |||
| + | * ,tempo impiegato: in media sec | ||
| + | |||
| + | |||
| + | ==== Misurare ==== | ||
| + | |||
| + | Un modo per controllare l' | ||
| + | |||
| + | |||
| + | I test in questa sezione sono stati eseguiti svuotando la cache di postgres prima di ogni test. In un sistema linux: | ||
| + | |||
| + | * service postgresql stop; | ||
| + | * echo 3 > / | ||
| + | * service postgresql start; | ||
| + | |||
| + | - Ottimizzazione: | ||
| + | |||
| + | 1° prova: senza indice multicolonna: | ||
| + | |||
| + | * EXPLAIN ANALYZE SELECT " | ||
| + | |||
| + | %% QUERY PLAN | ||
| + | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | Index Cond: (state_id = workflows_state.id) | ||
| + | Total runtime: 47.675 ms | ||
| + | (9 righe) | ||
| + | |||
| + | (END) %% | ||
| + | |||
| + | |||
| + | 2° prova: dopo l' | ||
| - | La vista puo essere relativa a tre | + | * EXPLAIN ANALYZE SELECT " |
| - | - **Riprodurre:** | + | |
| + | %% QUERY PLAN | ||
| + | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | Index Cond: ((content_type_id = 68) AND (state_id = workflows_state.id)) | ||
| + | Total runtime: 47.382 ms | ||
| + | (8 righe) | ||
| - | - **Misurare: | + | (END) %% |
profiling/django.1410522691.txt.gz · Last modified: (external edit)
