Closed GoogleCodeExporter closed 9 years ago
Original comment by ondrej.zara
on 15 Mar 2010 at 5:15
Added in r87, thanks!
Original comment by ondrej.zara
on 16 Mar 2010 at 1:36
I forgot to mention something REALLY important about this.
In the php-postgres and php-mysql backends, there is too many requests done.
- 1 for fetching T tables
- T for fetching C columns per table
- C(T) for fetching R relations per column per table
- T for fetching K keys per table
=> [ 1 + T + sum(C(T)) + T ] requests
In the php-pdo I made some caching (in RAM) with static properties :
- 1 for fetching T tables
- 1 for fetching sum(C(T)) columns
- 1 for fetching sum(R(C(T))) relations
- 1 for fetching sum(K(T)) keys
=> 4 requests
On my test site 1 request is ~200ms.
I have a large database : 111 tables, 1055 columns, 224 relations, 304 keys
=> php-pdo : 4 requests = 800ms
=> php-postgresql : 111+1055+224+304 = 1694 requests = 338.8s = 5min 38s 800ms
[ PHP script times out ]
This behavior can also be achieved for php-mysql and php-postgres BUT the use
of the
"static" keyword break compatibility with PHP 4...
Original comment by geompse@gmail.com
on 16 Mar 2010 at 6:31
(while in case since PDO is implement with PHP 5+, it does not matter using
this
syntax)
Original comment by geompse@gmail.com
on 16 Mar 2010 at 6:32
Original issue reported on code.google.com by
geompse@gmail.com
on 15 Mar 2010 at 3:48Attachments: