In Case, you are working on windows and behind proxy. composer may fails to connect to packagist.org and getcomposer.org.

First  Try this command,

Composer diagnose

check the actual problem.

Configure System wide Proxy

Configure the proxy as required from Internet Explorer (Tools -> Options -> LAN Settings). Now import these settings system-wide using the following command from an elevated command prompt:

netsh winhttp import proxy source=ie

To show/remove current system-wide setting, use the following:
netsh winhttp show proxy
netsh winhttp reset proxy

This is useful for applications that do not explicitly support setting a proxy, but use the Windows proxy configuration. This setting is preserved across reboots.

Set Proxy Via Command Line
set http_proxy = username:password@proxyserver:port

Now, Check it. ­čÖé

 

It’s Better to execute multiple sql query in single shot rather than firing one by one. ┬áthere is little bit variation in query for different RDBMS.

Oracle
INSERT ALL
INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
SELECT * FROM dual;

INSERT ALL
INTO suppliers (supplier_id, supplier_name) VALUES (1000, ‘IBM’)
INTO suppliers (supplier_id, supplier_name) VALUES (2000, ‘Microsoft’)
INTO customers (customer_id, customer_name, city) VALUES (999999, ‘Anderson Construction’, ‘New York’)
SELECT * FROM dual;

Postgresql
INSERT INTO tablename (column, column…) VALUES (row1_val1, row1_val2…), (row2_val1, row2_val2)..;

insert into things (thing) values (‘thing nr. 0’),
(‘thing nr. 1’),
(‘thing nr. 2’),
(‘thing nr. 3’),

(‘thing nr. 99999),
(‘thing nr. 100000);

Mysql
INSERT INTO tbl_name
(a,b,c)
VALUES
(1,2,3),
(4,5,6),
(7,8,9);