Re: Optimizing
| От | Steve Brett |
|---|---|
| Тема | Re: Optimizing |
| Дата | |
| Msg-id | 9sojmb$eht$1@news.tht.net обсуждение исходный текст |
| Ответ на | Optimizing ("Jeff Sack" <sackj@alum.rpi.edu>) |
| Список | pgsql-sql |
0.0pt;
> font-family:Arial'>
0.0pt;
> font-family:Arial'>Hello all.
>I
> have an academic project that I’m working on and, as I’m
relati=
> vely
> new to optimization techniques and database design, I’m wondering if
=
> some
> of you can give me some pointers.
=
> span>Below
> is the schema (to model baseball statistics), and I’m pretty much
stu=
> ck
> with it at this point. If
any=
> one
> has any suggestions involving changing the schema, I’d appreciate
hea=
> ring
> them just for future reference…
0.0pt;
> font-family:Arial'>
0.0pt;
> font-family:Arial'>There are several interesting queries that I’ve
be=
> en
> constructing just to get a feel for this schema, and given that some of
the=
> se
> tables contain 100,000-200,000 tuples, some
que=
> ries
> are taking a good 5-10 seconds to execute.=
>
> I’m just wondering if this is simply the fault of my schema
or=
> are
> these queries poorly constructed? style=3D'mso-spacerun:yes'> Here are some queries I’ve
be=
> en
> trying:
0.0pt;
> font-family:Arial'>
0.0pt;
> font-family:Arial'>Here’s a query for the top ten all time home run
> leaders:
style=3D'font-size:10.0pt;font-family:System;mso-bidi-font-family:Arial'>se=
> lect size=3D2 face=3DSystem> so-bidi-font-family:
> Arial'> P.first_name, P.la=
> st_name,
> S.player_id, sum(B.hr n>) as
> hr, (sum(B.h)::float / sum( >B.ab)::float)
> ab
style=3D'font-size:10.0pt;font-family:System;mso-bidi-font-family:Arial'>fr=
> om size=3D2 face=3DSystem> so-bidi-font-family:
> Arial'> statistics S, batting_stats B, players
=
> P
style=3D'font-size:10.0pt;font-family:System;mso-bidi-font-family:Arial'>wh=
> ere size=3D2 face=3DSystem> so-bidi-font-family:
> Arial'> S.id=3DB.id=
> and class=3DSpellE>S.player_id=3DP.id and
pan
> class=3DSpellE>B.ab>0
style=3D'font-size:10.0pt;font-family:System;mso-bidi-font-family:Arial'>gr=
> oup size=3D2 face=3DSystem> so-bidi-font-family:
> Arial'> by P.first_name, P=
> .last_name,
> S.player_id
style=3D'font-size:10.0pt;font-family:System;mso-bidi-font-family:Arial'>or=
> der size=3D2 face=3DSystem> so-bidi-font-family:
> Arial'> by hr desc limit
10;
10.0pt;
>
font-family:System;mso-bidi-font-family:Arial'>
e'> size=3D2 face=3DArial>Se=
> lect the
> 10 highest batting averages of all time where the batter had 600 or more
at
> bats. Also gather the name,
y=
> ear,
> team, hits, at bats...
e'> size=3D2 face=3D"Courier New"> Courier New"'>
e'> class=3DGramE> font-family:
> System;mso-bidi-font-family:"Courier
New"'>select size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'> (B.h::float / llE>B.ab)
> as avg, B.h, class=3DSpellE>B.ab, S.year, =3DSpellE>P.first_name,
> P.last_name, T.city=
> , class=3DSpellE>T.name
e'> class=3DGramE> font-family:
> System;mso-bidi-font-family:"Courier New"'>from size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'> batting_stats B, statistics S,
> players P, Teams T
e'> class=3DGramE> font-family:
> System;mso-bidi-font-family:"Courier New"'>where size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'> B.ab > 600 and =3DSpellE>S.id=3D class=3DSpellE>B.id and S.player_id=3D pan
> class=3DSpellE>P.id and S.team_id=3D class=3DSpellE>T.id
e'> class=3DGramE> font-family:
> System;mso-bidi-font-family:"Courier New"'>order size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'> by avg des=
> c
> limit 10;
10.0pt;
>
font-family:System;mso-bidi-font-family:Arial'>
e'> size=3D2 face=3DArial>To=
> find the
> names of the single season home run leaders, along with the total number
of
> home runs, the team name/city and the year:
e'> size=3D2 face=3D"Courier New"> Courier New"'>
e'> class=3DGramE> font-family:
> System;mso-bidi-font-family:"Courier
New"'>select size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'> P.first_name, llE>P.last_name,
> B.hr, T.name,
class=3DSpellE>T.city, S.year from
stati=
> stics S,
> batting_stats B, players P, teams T
e'> class=3DGramE> font-family:
> System;mso-bidi-font-family:"Courier New"'>where size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'> (S.id=3DB.=
> id)
> and
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'>(S.player_id=3D llE>P.id)
> and
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'>(B.hr>30)
and
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'>(T.id=3DS.t=
> eam_id)
> limit 10;
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> "Courier New"'>
e'> size=3D2 face=3DArial>Yo=
> u get the
> idea. These queries take a
wh=
> ile. style=3D'mso-spacerun:yes'> Is this just the way it is or
there
> things that can be done to optimize this?&=
> nbsp;
>
e'> size=3D2 face=3DArial>
e'> size=3D2 face=3DArial>On=
> e separate
> issue (the reason why the above examples are all about batting statistics)
=
> I’m
> having is representing the innings pitched statistic. style=3D'mso-spacerun:yes'> The way it is often represented
(an=
> d the
> way it is done in this schema) is something like this 123.0 means exactly
1=
> 23
> innings pitched, 123.1 means 123 1/3 innings, and 123.2 means 123 2/3
innin=
> gs
> pitched. I’m
contemplat=
> ing
> the best way to write a function that knows how to sum these values
> accurately. Is this
something=
> that
> can be done with PL/PGSQL or should I go straight to something like
PLPERL?=
> style=3D'mso-spacerun:yes'> Alternatively, I could research a
=
> way to
> represent fractions in the DB and write a script to convert all values in
t=
> his
> column. A=
> ny
> advice here??
e'> size=3D2 face=3DArial>
e'> size=3D2 face=3DArial>Th=
> anks in
> advance for any thoughts, comments,
suggestions…
e'> size=3D2 face=3DArial>
e'> size=3D2 face=3DArial>-J=
> eff
wtext .75pt;
> padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'> >
style=3D'font-size:10.0pt;font-family:System;mso-bidi-font-family:Arial'>
ze:10.0pt;
>
font-family:System;mso-bidi-font-family:System;font-weight:bold'>
e'> class=3DGramE> pt;
>
font-family:System;mso-bidi-font-family:System;font-weight:bold'>create an> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> table leagues
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>(
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> --
> create an integer id field for easier and efficient FK
referencing
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>id &n=
>
bsp;  =
> ; serial,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>name =
>
<=
> span
> class=3DSpellE>varchar(50),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>first_year so-tab-count:
> 1'> integer not
null=
>
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>check (first_year >
185=
> 0 and class=3DSpellE>first_year <
2010),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>last_year o-tab-count:
> 1'>
integer
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>check (first_year >
185=
> 0 and class=3DSpellE>first_year <
2010),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>primary key(id),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>constraint chronological_order pan>
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>check (last_year >=3D
<=
> span
> class=3DSpellE>first_year)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>);
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> class=3DGramE> pt;
>
font-family:System;mso-bidi-font-family:System;font-weight:bold'>create an> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> table teams
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>(
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>id &n=
>
bsp;  =
> ; serial,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>name =
>
<=
> span
> class=3DSpellE>varchar(50) not
null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>city =
>
&nb=
> sp; class=3DSpellE>varchar(50),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>first_year so-tab-count:
> 1'> integer not
null=
>
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>check (first_year >
185=
> 0 and class=3DSpellE>first_year <
2010),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>last_year o-tab-count:
> 1'>
integer
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>check (first_year >
185=
> 0 and class=3DSpellE>first_year <
2010),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>alt_id ab-count:
>
2'> =
> integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>league_id o-tab-count:
> 1'> integer not
null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>primary key(id),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>foreign key(alt_id)
refere=
> nces
> teams(id),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>foreign key(league_id)
ref=
> erences
> leagues(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>on delete cascade,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>constraint chronological_order pan>
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>check (last_year >=3D
<=
> span
> class=3DSpellE>first_year)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>);
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> class=3DGramE> pt;
>
font-family:System;mso-bidi-font-family:System;font-weight:bold'>create an> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> table players
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>(
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>id &n=
>
bsp;  =
> ; serial,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>first_name so-tab-count:
> 1'> varchar=
> (30),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>last_name o-tab-count:
> 1'> varchar=
> (30)
> not null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>bats =
>
&nb=
> sp; char(1)
> check (bats in ('L','R','S')),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>throws &nbs=
> p; char(1)
> check (throws in ('L','R')),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>dob count:
>
2'> =
>
date,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>primary key(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>);
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> class=3DGramE> pt;
>
font-family:System;mso-bidi-font-family:System;font-weight:bold'>create an> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> table
statistics
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>(
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>id &n=
>
bsp;  =
>
; &n=
> bsp; serial,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>year =
>
&nb=
>
sp; =
> integer
> not null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>g &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>player_id o-tab-count:
>
2'> =
> integer
> not null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>team_id tab-count:
>
3'> =
>
&nb=
> sp; integer
> not null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>foreign key(player_id)
ref=
> erences
> players(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>on delete cascade,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>foreign key(team_id)
refer=
> ences
> teams(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>on delete cascade,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>primary key(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>);
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> class=3DGramE> pt; > font-family:System;mso-bidi-font-family:System;font-weight:bold'>create an> size=3D2 face=3DSystem> so-bidi-font-family: > System;font-weight:bold'> table managing_stats<= > o:p>
> > e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>(
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>id &n=
>
bsp;  =
>
; &n=
> bsp; integer
> not null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>w &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>l &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>primary key(id),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>foreign key(id) references
statistics(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>on delete cascade
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>);
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> class=3DGramE> pt; > font-family:System;mso-bidi-font-family:System;font-weight:bold'>create an> size=3D2 face=3DSystem> so-bidi-font-family: > System;font-weight:bold'> table fielding_stats<= > o:p>
> > e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>(
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>id &n=
>
bsp;  =
>
; &n=
> bsp; integer
> not null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>pos &=
>
nbsp; &nbs=
>
p; &=
> nbsp; char(5),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>po
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>a &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>e &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>dp
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>primary key(id),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>foreign key(id) references
statistics(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>on delete cascade
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>);
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> class=3DGramE> pt;
>
font-family:System;mso-bidi-font-family:System;font-weight:bold'>create an> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> table batting_stats
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>(
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>id &n=
>
bsp;  =
>
; &n=
> bsp; integer
> not null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>ab
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>r &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>h &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>doubles &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>triples &nb=
>
sp; =
>
integer=
> ,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>hr &n=
>
bsp;  =
>
; &n=
> bsp; integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>rbi count:
>
3'> =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>sb
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>cs
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>bb &n=
>
bsp;  =
>
; &n=
> bsp; integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>so &n=
>
bsp;  =
>
; &n=
> bsp; integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>sh
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>sf
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>ibb count:
>
3'> =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>hbp count:
>
3'> =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>primary key(id),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>foreign key(id) references
statistics(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>on delete cascade
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>);
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> class=3DGramE> pt; > font-family:System;mso-bidi-font-family:System;font-weight:bold'>create an> size=3D2 face=3DSystem> so-bidi-font-family: > System;font-weight:bold'> table pitching_stats<= > o:p>
> > e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>(
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>id &n=
>
bsp;  =
>
; &n=
> bsp; integer
> not null,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>w &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>l &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>gs
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>cg &n=
>
bsp;  =
>
; &n=
> bsp; integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>sh ount:1'>
style=3D'mso-tab-count:2'> &=
>
nbsp; &nbs=
> p; integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>sv
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>ip
ount:3'> &=
>
nbsp; &nbs=
> p;
numeric(5,1),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>h &nb=
>
sp; =
>
&nb=
> sp;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DSpellE>er
ount:3'> &=
>
nbsp; &nbs=
> p;
integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>hr &n=
>
bsp;  =
>
; &n=
> bsp; integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>bb &n=
>
bsp;  =
>
; &n=
> bsp; integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>so &n=
>
bsp;  =
>
; &n=
> bsp; integer,
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>primary key(id),
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
> class=3DGramE>foreign key(id) references
statistics(id)
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'> =
>
&nb=
> sp; class=3DGramE>on delete cascade
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>);
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
e'> size=3D2 face=3DSystem> so-bidi-font-family:
> System;font-weight:bold'>
0.0pt;
> font-family:Arial'>
В списке pgsql-sql по дате отправления: