File: circle_extended.sql

package info (click to toggle)
pgsphere 1.1.1%2B2020-10-20-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,700 kB
  • sloc: ansic: 12,032; sql: 6,091; cpp: 853; makefile: 216; perl: 168; yacc: 145; xml: 66; lex: 55; sh: 1
file content (115 lines) | stat: -rw-r--r-- 3,773 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
-- indexed operations.....

SET enable_indexscan=off;

select count(sp) from spoint_data where sp @ '<(0d,90d),1.0d>'::scircle;

select count(sp) from spoint_data where '<(0d,90d),1.0d>'::scircle ~ sp;

select count(sp) from spoint_data where sp @ '<(0d,90d),1.1d>'::scircle;

select count(sp) from spoint_data where '<(0d,90d),1.1d>'::scircle ~ sp;

select count(sp) from spoint_data where sp @ '<(0d,-90d),1.0d>'::scircle;

select count(sp) from spoint_data where '<(0d,-90d),1.0d>'::scircle ~ sp;

select count(sp) from spoint_data where sp @ '<(0d,-90d),1.1d>'::scircle;

select count(sp) from spoint_data where '<(0d,-90d),1.1d>'::scircle ~ sp;

select count(sp) from spoint_data where sp @ '<(0d,0d),2.1d>'::scircle;

select count(sp) from spoint_data where '<(0d,0d),2.1d>'::scircle ~ sp;



select count(sc) from scircle_data where sc && '<(0d,90d),1.0d>';

select count(sc) from scircle_data where sc @ '<(0d,90d),1.0d>';

select count(sc) from scircle_data where '<(0d,90d),1.0d>' ~ sc;

select count(sc) from scircle_data where sc && '<(0d,90d),1.1d>';

select count(sc) from scircle_data where sc @ '<(0d,90d),1.1d>';

select count(sc) from scircle_data where '<(0d,90d),1.1d>' ~ sc;

select count(sc) from scircle_data where sc && '<(0d,-90d),1.0d>';

select count(sc) from scircle_data where sc @ '<(0d,-90d),1.0d>';

select count(sc) from scircle_data where '<(0d,-90d),1.0d>' ~ sc;

select count(sc) from scircle_data where sc && '<(0d,-90d),1.1d>';

select count(sc) from scircle_data where sc @ '<(0d,-90d),1.1d>';

select count(sc) from scircle_data where '<(0d,-90d),1.1d>' ~ sc;

select count(sc) from scircle_data where sc && '<(0d,0d),2.1d>'::scircle;

select count(sc) from scircle_data where sc @ '<(0d,0d),2.1d>'::scircle;

select count(sc) from scircle_data where '<(0d,0d),2.1d>'::scircle ~ sc;



SET enable_indexscan=on;

select count(sp) from spoint_data where sp @ '<(0d,90d),1.0d>'::scircle;

select count(sp) from spoint_data where '<(0d,90d),1.0d>'::scircle ~ sp;

select count(sp) from spoint_data where sp @ '<(0d,90d),1.1d>'::scircle;

select count(sp) from spoint_data where '<(0d,90d),1.1d>'::scircle ~ sp;

select count(sp) from spoint_data where sp @ '<(0d,-90d),1.0d>'::scircle;

select count(sp) from spoint_data where '<(0d,-90d),1.0d>'::scircle ~ sp;

select count(sp) from spoint_data where sp @ '<(0d,-90d),1.1d>'::scircle;

select count(sp) from spoint_data where '<(0d,-90d),1.1d>'::scircle ~ sp;

select count(sp) from spoint_data where sp @ '<(0d,0d),2.1d>'::scircle;

select count(sp) from spoint_data where '<(0d,0d),2.1d>'::scircle ~ sp;



select count(sc) from scircle_data where sc && '<(0d,90d),1.0d>';

select count(sc) from scircle_data where sc @ '<(0d,90d),1.0d>';

select count(sc) from scircle_data where '<(0d,90d),1.0d>' ~ sc;

select count(sc) from scircle_data where sc && '<(0d,90d),1.1d>';

select count(sc) from scircle_data where sc @ '<(0d,90d),1.1d>';

select count(sc) from scircle_data where '<(0d,90d),1.1d>' ~ sc;

select count(sc) from scircle_data where sc && '<(0d,-90d),1.0d>';

select count(sc) from scircle_data where sc @ '<(0d,-90d),1.0d>';

select count(sc) from scircle_data where '<(0d,-90d),1.0d>' ~ sc;

select count(sc) from scircle_data where sc && '<(0d,-90d),1.1d>';

select count(sc) from scircle_data where sc @ '<(0d,-90d),1.1d>';

select count(sc) from scircle_data where '<(0d,-90d),1.1d>' ~ sc;

select count(sc) from scircle_data where sc && '<(0d,0d),2.1d>'::scircle;

select count(sc) from scircle_data where sc @ '<(0d,0d),2.1d>'::scircle;

select count(sc) from scircle_data where '<(0d,0d),2.1d>'::scircle ~ sc;


-- "Cross-correlation" about 30 seconds on PIII-750
select count(spoint_data.sp) from spoint_data,scircle_data where spoint_data.sp @ scircle_data.sc;