CREATE TABLE table_12834315_4 (barrel_length VARCHAR2, rear_sight VARCHAR2, muzzle_device VARCHAR2)

Name the barrel length for rear sight a2 for factory compensator
SELECT barrel_length FROM table_12834315_4 WHERE rear_sight = "A2" AND muzzle_device = "Factory compensator"
SELECT "barrel_length" FROM "table_12834315_4" WHERE "A2" = "rear_sight" AND "Factory compensator" = "muzzle_device"