SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select aircraft_code from aircrafts_data order by 1; explain (analyze,buffers) select aircraft_code from aircrafts_data where aircraft_code = '763' ; set enable_seqscan = false; explain (analyze,buffers) select aircraft_code from aircrafts_data where aircraft_code = '763' ; /* |---------------| | aircraft_code | |---------------| | 319 | | 320 | | 321 | | 733 | | 763 | | 773 | | CN1 | | CR2 | | SU9 | |---------------------------------------------------------------------------------------------------------| | QUERY PLAN | |---------------------------------------------------------------------------------------------------------| | Seq Scan on aircrafts_data (cost=0.00..1.11 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=1) | | Filter: (aircraft_code = '763'::bpchar) | | Rows Removed by Filter: 8 | | Buffers: shared hit=1 | | Planning time: 0.044 ms | | Execution time: 0.017 ms | ✓ (1 query) |-------------------------------------------------------------------------------------------------------------------------------------| | QUERY PLAN | |-------------------------------------------------------------------------------------------------------------------------------------| | Index Only Scan using aircrafts_pkey on aircrafts_data (cost=0.14..8.15 rows=1 width=16) (actual time=0.138..0.139 rows=1 loops=1) | | Index Cond: (aircraft_code = '763'::bpchar) | | Heap Fetches: 1 | | Buffers: shared hit=1 read=1 | | Planning time: 0.049 ms | | Execution time: 0.151 ms */

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear