User Tools

Site Tools


profiling:django

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
profiling:django [2014/09/12 16:43] lettiprofiling:django [2015/02/16 15:28] (current) – external edit 127.0.0.1
Line 61: Line 61:
 ==== Misurare ====  ==== Misurare ==== 
  
-Un modo per controllare l'effettivo utilizo degli indici è lanciare dalla dbshell di django la query di **Utilizzo degli indici** alla pagina [[sysadmin:postgresql]]+Un modo per controllare l'effettivo utilizo degli indici è lanciare dalla dbshell di django la query di **Utilizzo degli indici** alla pagina [[ops:postgresql]]
  
  
Line 76: Line 76:
 * EXPLAIN ANALYZE SELECT "workflows_stateobjectrelation"."id", "workflows_stateobjectrelation"."content_type_id", "workflows_stateobjectrelation"."content_id", "workflows_stateobjectrelation"."state_id" FROM "workflows_stateobjectrelation" INNER JOIN "workflows_state" ON ("workflows_stateobjectrelation"."state_id" = "workflows_state"."id") WHERE ("workflows_state"."name" = 'Closed'  AND "workflows_stateobjectrelation"."content_type_id" = 68 ); * EXPLAIN ANALYZE SELECT "workflows_stateobjectrelation"."id", "workflows_stateobjectrelation"."content_type_id", "workflows_stateobjectrelation"."content_id", "workflows_stateobjectrelation"."state_id" FROM "workflows_stateobjectrelation" INNER JOIN "workflows_state" ON ("workflows_stateobjectrelation"."state_id" = "workflows_state"."id") WHERE ("workflows_state"."name" = 'Closed'  AND "workflows_stateobjectrelation"."content_type_id" = 68 );
    
-                            QUERY PLAN                                                                        +%%                            QUERY PLAN                                                                        
 ---------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------
  Nested Loop  (cost=52.76..238.26 rows=495 width=16) (actual time=31.081..47.576 rows=195 loops=1)  Nested Loop  (cost=52.76..238.26 rows=495 width=16) (actual time=31.081..47.576 rows=195 loops=1)
    ->  Seq Scan on workflows_state  (cost=0.00..1.27 rows=1 width=4) (actual time=8.104..8.121 rows=2 loops=1)    ->  Seq Scan on workflows_state  (cost=0.00..1.27 rows=1 width=4) (actual time=8.104..8.121 rows=2 loops=1)
-         Filter: ( (name)::text = 'Closed'::text)+         Filter: ((name)::text = 'Closed'::text)
    ->  Bitmap Heap Scan on workflows_stateobjectrelation  (cost=52.76..203.37 rows=2689 width=16) (actual time=11.530..19.676 rows=98 loops=2)    ->  Bitmap Heap Scan on workflows_stateobjectrelation  (cost=52.76..203.37 rows=2689 width=16) (actual time=11.530..19.676 rows=98 loops=2)
          Recheck Cond: (state_id = workflows_state.id)          Recheck Cond: (state_id = workflows_state.id)
Line 89: Line 89:
 (9 righe) (9 righe)
  
-(END)+(END) %%
  
  
Line 98: Line 98:
  
                    
-                     QUERY PLAN                                                                                +%%                     QUERY PLAN                                                                                
 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Nested Loop  (cost=30.21..182.54 rows=495 width=16) (actual time=31.059..47.288 rows=195 loops=1)  Nested Loop  (cost=30.21..182.54 rows=495 width=16) (actual time=31.059..47.288 rows=195 loops=1)
    ->  Seq Scan on workflows_state  (cost=0.00..1.27 rows=1 width=4) (actual time=8.068..8.100 rows=2 loops=1)    ->  Seq Scan on workflows_state  (cost=0.00..1.27 rows=1 width=4) (actual time=8.068..8.100 rows=2 loops=1)
-         Filter: ( (name)::text = 'Closed'::text)+         Filter: ((name)::text = 'Closed'::text)
    ->  Bitmap Heap Scan on workflows_stateobjectrelation  (cost=30.21..164.24 rows=1362 width=16) (actual time=11.548..19.552 rows=98 loops=2)    ->  Bitmap Heap Scan on workflows_stateobjectrelation  (cost=30.21..164.24 rows=1362 width=16) (actual time=11.548..19.552 rows=98 loops=2)
          Recheck Cond: ((content_type_id = 68) AND (state_id = workflows_state.id))          Recheck Cond: ((content_type_id = 68) AND (state_id = workflows_state.id))
Line 109: Line 109:
  Total runtime: 47.382 ms  Total runtime: 47.382 ms
 (8 righe) (8 righe)
 +
 +(END) %%
  
  
profiling/django.1410540220.txt.gz · Last modified: 2014/10/28 11:28 (external edit)